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
fc7ff5bb
Unverified
Commit
fc7ff5bb
authored
Aug 09, 2023
by
ZackYoung
Committed by
GitHub
Aug 09, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Fix][web]Fix some bug (#2186)
* fix_some_bug * fix_some_bug
parent
b4e1ac13
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
AppConfig.java
dinky-admin/src/main/java/org/dinky/configure/AppConfig.java
+14
-1
index.tsx
dinky-web/src/pages/DataStudio/FooterContainer/index.tsx
+3
-3
No files found.
dinky-admin/src/main/java/org/dinky/configure/AppConfig.java
View file @
fc7ff5bb
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
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
;
...
@@ -27,6 +28,7 @@ import java.util.Locale;
...
@@ -27,6 +28,7 @@ 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
;
...
@@ -103,7 +105,18 @@ public class AppConfig implements WebMvcConfigurer {
...
@@ -103,7 +105,18 @@ public class AppConfig implements WebMvcConfigurer {
// .excludePathPatterns("/druid/**")
// .excludePathPatterns("/druid/**")
// .excludePathPatterns("/openapi/**");
// .excludePathPatterns("/openapi/**");
registry
.
addInterceptor
(
new
SaInterceptor
(
handle
->
StpUtil
.
checkLogin
()))
registry
.
addInterceptor
(
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-web/src/pages/DataStudio/FooterContainer/index.tsx
View file @
fc7ff5bb
...
@@ -34,9 +34,9 @@ const FooterContainer: React.FC<FooterContainerProps & StateType> = (props) => {
...
@@ -34,9 +34,9 @@ const FooterContainer: React.FC<FooterContainerProps & StateType> = (props) => {
const
[
viewJobRunning
,
setViewJobRunning
]
=
useState
(
false
);
const
[
viewJobRunning
,
setViewJobRunning
]
=
useState
(
false
);
const
eventSource
=
getSseData
(
"/api/sse/getJvmInfo"
);
const
[
memDetailInfo
,
setMemDetailInfo
]
=
useState
(
memDetails
);
const
[
memDetailInfo
,
setMemDetailInfo
]
=
useState
(
memDetails
);
useEffect
(()
=>
{
useEffect
(()
=>
{
const
eventSource
=
getSseData
(
"/api/sse/getJvmInfo"
);
eventSource
.
onmessage
=
(
event
)
=>
{
eventSource
.
onmessage
=
(
event
)
=>
{
const
data
=
JSON
.
parse
(
event
.
data
);
const
data
=
JSON
.
parse
(
event
.
data
);
setMemDetailInfo
(
Number
(
data
[
"heapUsed"
]
/
1024
/
1024
).
toFixed
(
0
)
+
"/"
+
Number
(
data
[
"total"
]
/
1024
/
1024
).
toFixed
(
0
)
+
"M"
)
setMemDetailInfo
(
Number
(
data
[
"heapUsed"
]
/
1024
/
1024
).
toFixed
(
0
)
+
"/"
+
Number
(
data
[
"total"
]
/
1024
/
1024
).
toFixed
(
0
)
+
"M"
)
...
@@ -52,9 +52,9 @@ const FooterContainer: React.FC<FooterContainerProps & StateType> = (props) => {
...
@@ -52,9 +52,9 @@ const FooterContainer: React.FC<FooterContainerProps & StateType> = (props) => {
{
{
text
:
<
span
text
:
<
span
style=
{
{
backgroundColor
:
token
.
colorBgContainer
}
}
><
div
style=
{
{
style=
{
{
backgroundColor
:
token
.
colorBgContainer
}
}
><
div
style=
{
{
width
:
(
1
-
(
parseInt
(
memDetail
s
.
split
(
"/"
)[
0
])
/
parseInt
(
memDetails
.
split
(
"/"
)[
1
])))
*
100
+
"%"
,
width
:
(
1
-
(
parseInt
(
memDetail
Info
.
split
(
"/"
)[
0
])
/
parseInt
(
memDetailInfo
.
split
(
"/"
)[
1
])))
*
100
+
"%"
,
backgroundColor
:
token
.
colorFill
backgroundColor
:
token
.
colorFill
}
}
>
{
memDetail
s
}
</
div
></
span
>,
}
}
>
{
memDetail
Info
}
</
div
></
span
>,
title
:
l
(
"pages.datastudio.footer.memDetails"
,
""
,
{
title
:
l
(
"pages.datastudio.footer.memDetails"
,
""
,
{
max
:
memDetailInfo
.
split
(
"/"
)[
1
],
max
:
memDetailInfo
.
split
(
"/"
)[
1
],
used
:
memDetailInfo
.
split
(
"/"
)[
0
]
used
:
memDetailInfo
.
split
(
"/"
)[
0
]
...
...
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