Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dinky
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangpeng
dinky
Commits
c3c35e84
Unverified
Commit
c3c35e84
authored
Aug 11, 2023
by
ZackYoung
Committed by
GitHub
Aug 11, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove_task_config_field (#2194)
parent
a497d7e5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1 addition
and
68 deletions
+1
-68
AppConfig.java
dinky-admin/src/main/java/org/dinky/configure/AppConfig.java
+1
-14
GitController.java
...min/src/main/java/org/dinky/controller/GitController.java
+0
-4
MonitorController.java
...src/main/java/org/dinky/controller/MonitorController.java
+0
-2
SseController.java
...min/src/main/java/org/dinky/controller/SseController.java
+0
-6
PublicInterface.java
.../main/java/org/dinky/data/annotation/PublicInterface.java
+0
-31
TenantInterceptor.java
...rc/main/java/org/dinky/interceptor/TenantInterceptor.java
+0
-11
index.tsx
dinky-web/src/pages/DataStudio/HeaderContainer/index.tsx
+0
-0
No files found.
dinky-admin/src/main/java/org/dinky/configure/AppConfig.java
View file @
c3c35e84
...
@@ -19,7 +19,6 @@
...
@@ -19,7 +19,6 @@
package
org
.
dinky
.
configure
;
package
org
.
dinky
.
configure
;
import
org.dinky.data.annotation.PublicInterface
;
import
org.dinky.data.constant.BaseConstant
;
import
org.dinky.data.constant.BaseConstant
;
import
org.dinky.interceptor.LocaleChangeInterceptor
;
import
org.dinky.interceptor.LocaleChangeInterceptor
;
import
org.dinky.interceptor.TenantInterceptor
;
import
org.dinky.interceptor.TenantInterceptor
;
...
@@ -28,7 +27,6 @@ import java.util.Locale;
...
@@ -28,7 +27,6 @@ import java.util.Locale;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.web.method.HandlerMethod
;
import
org.springframework.web.servlet.LocaleResolver
;
import
org.springframework.web.servlet.LocaleResolver
;
import
org.springframework.web.servlet.config.annotation.InterceptorRegistry
;
import
org.springframework.web.servlet.config.annotation.InterceptorRegistry
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
;
...
@@ -105,18 +103,7 @@ public class AppConfig implements WebMvcConfigurer {
...
@@ -105,18 +103,7 @@ public class AppConfig implements WebMvcConfigurer {
// .excludePathPatterns("/druid/**")
// .excludePathPatterns("/druid/**")
// .excludePathPatterns("/openapi/**");
// .excludePathPatterns("/openapi/**");
registry
.
addInterceptor
(
registry
.
addInterceptor
(
new
SaInterceptor
(
handler
->
StpUtil
.
checkLogin
()))
new
SaInterceptor
(
handler
->
{
if
(
handler
instanceof
HandlerMethod
)
{
if
(((
HandlerMethod
)
handler
)
.
getMethodAnnotation
(
PublicInterface
.
class
)
!=
null
)
{
return
;
}
StpUtil
.
checkLogin
();
}
}))
.
addPathPatterns
(
"/api/**"
)
.
addPathPatterns
(
"/api/**"
)
.
excludePathPatterns
(
.
excludePathPatterns
(
"/api/login"
,
"/api/ldap/ldapEnableStatus"
,
"/api/login"
,
"/api/ldap/ldapEnableStatus"
,
...
...
dinky-admin/src/main/java/org/dinky/controller/GitController.java
View file @
c3c35e84
...
@@ -20,7 +20,6 @@
...
@@ -20,7 +20,6 @@
package
org
.
dinky
.
controller
;
package
org
.
dinky
.
controller
;
import
org.dinky.data.annotation.Log
;
import
org.dinky.data.annotation.Log
;
import
org.dinky.data.annotation.PublicInterface
;
import
org.dinky.data.dto.GitProjectDTO
;
import
org.dinky.data.dto.GitProjectDTO
;
import
org.dinky.data.dto.TreeNodeDTO
;
import
org.dinky.data.dto.TreeNodeDTO
;
import
org.dinky.data.enums.BusinessType
;
import
org.dinky.data.enums.BusinessType
;
...
@@ -41,7 +40,6 @@ import java.util.concurrent.TimeUnit;
...
@@ -41,7 +40,6 @@ import java.util.concurrent.TimeUnit;
import
org.springframework.http.MediaType
;
import
org.springframework.http.MediaType
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.CrossOrigin
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
@@ -227,8 +225,6 @@ public class GitController {
...
@@ -227,8 +225,6 @@ public class GitController {
* @return {@link Result} of {@link Void}
* @return {@link Result} of {@link Void}
*/
*/
@GetMapping
(
path
=
"/build-step-logs"
,
produces
=
MediaType
.
TEXT_EVENT_STREAM_VALUE
)
@GetMapping
(
path
=
"/build-step-logs"
,
produces
=
MediaType
.
TEXT_EVENT_STREAM_VALUE
)
@CrossOrigin
(
"*"
)
@PublicInterface
@Log
(
title
=
"GitProject Build Step Logs"
,
businessType
=
BusinessType
.
QUERY
)
@Log
(
title
=
"GitProject Build Step Logs"
,
businessType
=
BusinessType
.
QUERY
)
@ApiOperation
(
"GitProject Build Step Logs"
)
@ApiOperation
(
"GitProject Build Step Logs"
)
public
SseEmitter
buildStepLogs
(
@RequestParam
(
"id"
)
Integer
id
)
{
public
SseEmitter
buildStepLogs
(
@RequestParam
(
"id"
)
Integer
id
)
{
...
...
dinky-admin/src/main/java/org/dinky/controller/MonitorController.java
View file @
c3c35e84
...
@@ -20,7 +20,6 @@
...
@@ -20,7 +20,6 @@
package
org
.
dinky
.
controller
;
package
org
.
dinky
.
controller
;
import
org.dinky.data.annotation.Log
;
import
org.dinky.data.annotation.Log
;
import
org.dinky.data.annotation.PublicInterface
;
import
org.dinky.data.dto.MetricsLayoutDTO
;
import
org.dinky.data.dto.MetricsLayoutDTO
;
import
org.dinky.data.enums.BusinessType
;
import
org.dinky.data.enums.BusinessType
;
import
org.dinky.data.model.Metrics
;
import
org.dinky.data.model.Metrics
;
...
@@ -65,7 +64,6 @@ public class MonitorController {
...
@@ -65,7 +64,6 @@ public class MonitorController {
}
}
@GetMapping
(
value
=
"/getLastUpdateData"
,
produces
=
MediaType
.
TEXT_EVENT_STREAM_VALUE
)
@GetMapping
(
value
=
"/getLastUpdateData"
,
produces
=
MediaType
.
TEXT_EVENT_STREAM_VALUE
)
@PublicInterface
@ApiOperation
(
"Get Last Update Data"
)
@ApiOperation
(
"Get Last Update Data"
)
public
SseEmitter
getLastUpdateData
(
Long
lastTime
)
{
public
SseEmitter
getLastUpdateData
(
Long
lastTime
)
{
SseEmitter
emitter
=
new
SseEmitterUTF8
(
TimeUnit
.
MINUTES
.
toMillis
(
30
));
SseEmitter
emitter
=
new
SseEmitterUTF8
(
TimeUnit
.
MINUTES
.
toMillis
(
30
));
...
...
dinky-admin/src/main/java/org/dinky/controller/SseController.java
View file @
c3c35e84
...
@@ -19,14 +19,12 @@
...
@@ -19,14 +19,12 @@
package
org
.
dinky
.
controller
;
package
org
.
dinky
.
controller
;
import
org.dinky.data.annotation.PublicInterface
;
import
org.dinky.service.MonitorService
;
import
org.dinky.service.MonitorService
;
import
org.dinky.sse.SseEmitterUTF8
;
import
org.dinky.sse.SseEmitterUTF8
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.CrossOrigin
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -44,8 +42,6 @@ public class SseController {
...
@@ -44,8 +42,6 @@ public class SseController {
private
final
MonitorService
monitorService
;
private
final
MonitorService
monitorService
;
@GetMapping
(
value
=
"/getLastUpdateData"
,
produces
=
MediaType
.
TEXT_EVENT_STREAM_VALUE
)
@GetMapping
(
value
=
"/getLastUpdateData"
,
produces
=
MediaType
.
TEXT_EVENT_STREAM_VALUE
)
@CrossOrigin
(
"*"
)
@PublicInterface
@ApiOperation
(
"Get Last Update Data"
)
@ApiOperation
(
"Get Last Update Data"
)
public
SseEmitter
getLastUpdateData
(
Long
lastTime
)
{
public
SseEmitter
getLastUpdateData
(
Long
lastTime
)
{
SseEmitter
emitter
=
new
SseEmitterUTF8
(
TimeUnit
.
MINUTES
.
toMillis
(
30
));
SseEmitter
emitter
=
new
SseEmitterUTF8
(
TimeUnit
.
MINUTES
.
toMillis
(
30
));
...
@@ -54,8 +50,6 @@ public class SseController {
...
@@ -54,8 +50,6 @@ public class SseController {
}
}
@GetMapping
(
value
=
"/getJvmInfo"
,
produces
=
MediaType
.
TEXT_EVENT_STREAM_VALUE
)
@GetMapping
(
value
=
"/getJvmInfo"
,
produces
=
MediaType
.
TEXT_EVENT_STREAM_VALUE
)
@CrossOrigin
(
"*"
)
@PublicInterface
@ApiOperation
(
"Get JVM Info"
)
@ApiOperation
(
"Get JVM Info"
)
public
SseEmitter
getJvmInfo
(
Long
lastTime
)
{
public
SseEmitter
getJvmInfo
(
Long
lastTime
)
{
SseEmitter
emitter
=
new
SseEmitterUTF8
(
TimeUnit
.
MINUTES
.
toMillis
(
30
));
SseEmitter
emitter
=
new
SseEmitterUTF8
(
TimeUnit
.
MINUTES
.
toMillis
(
30
));
...
...
dinky-admin/src/main/java/org/dinky/data/annotation/PublicInterface.java
deleted
100644 → 0
View file @
a497d7e5
/*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org
.
dinky
.
data
.
annotation
;
import
java.lang.annotation.Documented
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
@Target
({
ElementType
.
TYPE
,
ElementType
.
METHOD
})
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Documented
public
@interface
PublicInterface
{}
dinky-admin/src/main/java/org/dinky/interceptor/TenantInterceptor.java
View file @
c3c35e84
...
@@ -21,17 +21,14 @@ package org.dinky.interceptor;
...
@@ -21,17 +21,14 @@ package org.dinky.interceptor;
import
org.dinky.assertion.Asserts
;
import
org.dinky.assertion.Asserts
;
import
org.dinky.context.TenantContextHolder
;
import
org.dinky.context.TenantContextHolder
;
import
org.dinky.data.annotation.PublicInterface
;
import
javax.servlet.http.Cookie
;
import
javax.servlet.http.Cookie
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
org.springframework.web.method.HandlerMethod
;
import
org.springframework.web.servlet.AsyncHandlerInterceptor
;
import
org.springframework.web.servlet.AsyncHandlerInterceptor
;
import
cn.dev33.satoken.SaManager
;
import
cn.dev33.satoken.SaManager
;
import
cn.dev33.satoken.exception.NotLoginException
;
import
cn.hutool.core.lang.Opt
;
import
cn.hutool.core.lang.Opt
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -62,14 +59,6 @@ public class TenantInterceptor implements AsyncHandlerInterceptor {
...
@@ -62,14 +59,6 @@ public class TenantInterceptor implements AsyncHandlerInterceptor {
}
}
}
}
}
}
if
(!
isPass
)
{
if
(
handler
instanceof
HandlerMethod
)
{
if
(((
HandlerMethod
)
handler
).
getMethodAnnotation
(
PublicInterface
.
class
)
!=
null
)
{
return
true
;
}
}
throw
new
NotLoginException
(
"请先登录"
,
"login"
,
"login"
);
}
return
AsyncHandlerInterceptor
.
super
.
preHandle
(
request
,
response
,
handler
);
return
AsyncHandlerInterceptor
.
super
.
preHandle
(
request
,
response
,
handler
);
}
}
}
}
dinky-web/src/pages/DataStudio/HeaderContainer/index.tsx
View file @
c3c35e84
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment