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
b47ed7d3
Unverified
Commit
b47ed7d3
authored
Jan 07, 2024
by
Zzm0809
Committed by
GitHub
Jan 07, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Optimization] optimization the way to obtain versions (#2943)
* How to obtain the optimized version * Spotless Apply --------- Co-authored-by:
Zzm0809
<
Zzm0809@users.noreply.github.com
>
parent
57465e4e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
11 deletions
+25
-11
AdminController.java
...n/src/main/java/org/dinky/controller/AdminController.java
+7
-0
FlinkAPI.java
dinky-core/src/main/java/org/dinky/api/FlinkAPI.java
+2
-1
index.tsx
dinky-web/src/components/RightContent/index.tsx
+14
-5
constants.tsx
dinky-web/src/services/constants.tsx
+0
-5
endpoints.tsx
dinky-web/src/services/endpoints.tsx
+2
-0
No files found.
dinky-admin/src/main/java/org/dinky/controller/AdminController.java
View file @
b47ed7d3
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
package
org
.
dinky
.
controller
;
package
org
.
dinky
.
controller
;
import
org.dinky.DinkyVersion
;
import
org.dinky.data.dto.LoginDTO
;
import
org.dinky.data.dto.LoginDTO
;
import
org.dinky.data.dto.UserDTO
;
import
org.dinky.data.dto.UserDTO
;
import
org.dinky.data.enums.Status
;
import
org.dinky.data.enums.Status
;
...
@@ -118,4 +119,10 @@ public class AdminController {
...
@@ -118,4 +119,10 @@ public class AdminController {
public
Result
<
SaTokenInfo
>
getTokenInfo
()
{
public
Result
<
SaTokenInfo
>
getTokenInfo
()
{
return
Result
.
succeed
(
StpUtil
.
getTokenInfo
());
return
Result
.
succeed
(
StpUtil
.
getTokenInfo
());
}
}
@GetMapping
(
"/version"
)
@ApiOperation
(
value
=
"Query Service Version"
,
notes
=
"Query Dinky Service Version Number"
)
public
Result
<
Object
>
getVersionInfo
()
{
return
Result
.
succeed
((
Object
)
DinkyVersion
.
getVersion
());
}
}
}
dinky-core/src/main/java/org/dinky/api/FlinkAPI.java
View file @
b47ed7d3
...
@@ -22,6 +22,7 @@ package org.dinky.api;
...
@@ -22,6 +22,7 @@ package org.dinky.api;
import
org.dinky.assertion.Asserts
;
import
org.dinky.assertion.Asserts
;
import
org.dinky.data.constant.FlinkRestAPIConstant
;
import
org.dinky.data.constant.FlinkRestAPIConstant
;
import
org.dinky.data.constant.NetConstant
;
import
org.dinky.data.constant.NetConstant
;
import
org.dinky.data.exception.BusException
;
import
org.dinky.gateway.enums.GatewayType
;
import
org.dinky.gateway.enums.GatewayType
;
import
org.dinky.gateway.enums.SavePointType
;
import
org.dinky.gateway.enums.SavePointType
;
import
org.dinky.gateway.model.JobInfo
;
import
org.dinky.gateway.model.JobInfo
;
...
@@ -202,7 +203,7 @@ public class FlinkAPI {
...
@@ -202,7 +203,7 @@ public class FlinkAPI {
break
;
break
;
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
Runtime
Exception
(
e
.
getMessage
());
throw
new
Bus
Exception
(
e
.
getMessage
());
}
}
}
}
...
...
dinky-web/src/components/RightContent/index.tsx
View file @
b47ed7d3
...
@@ -18,7 +18,9 @@
...
@@ -18,7 +18,9 @@
*/
*/
import
{
ThemeCloud
,
ThemeStar
}
from
'@/components/ThemeSvg/ThemeSvg'
;
import
{
ThemeCloud
,
ThemeStar
}
from
'@/components/ThemeSvg/ThemeSvg'
;
import
{
LANGUAGE_KEY
,
LANGUAGE_ZH
,
STORY_LANGUAGE
,
VERSION
}
from
'@/services/constants'
;
import
{
queryDataByParams
}
from
'@/services/BusinessCrud'
;
import
{
LANGUAGE_KEY
,
LANGUAGE_ZH
,
STORY_LANGUAGE
}
from
'@/services/constants'
;
import
{
API_CONSTANTS
}
from
'@/services/endpoints'
;
import
{
THEME
}
from
'@/types/Public/data'
;
import
{
THEME
}
from
'@/types/Public/data'
;
import
{
useLocalStorage
}
from
'@/utils/hook/useLocalStorage'
;
import
{
useLocalStorage
}
from
'@/utils/hook/useLocalStorage'
;
import
{
l
}
from
'@/utils/intl'
;
import
{
l
}
from
'@/utils/intl'
;
...
@@ -39,6 +41,7 @@ const GlobalHeaderRight: React.FC = () => {
...
@@ -39,6 +41,7 @@ const GlobalHeaderRight: React.FC = () => {
const
[
theme
,
setTheme
]
=
useLocalStorage
(
THEME
.
NAV_THEME
,
initialState
?.
settings
?.
navTheme
);
const
[
theme
,
setTheme
]
=
useLocalStorage
(
THEME
.
NAV_THEME
,
initialState
?.
settings
?.
navTheme
);
const
[
language
,
setLanguage
]
=
useLocalStorage
(
LANGUAGE_KEY
,
LANGUAGE_ZH
);
const
[
language
,
setLanguage
]
=
useLocalStorage
(
LANGUAGE_KEY
,
LANGUAGE_ZH
);
const
[
langCache
,
setLangCache
]
=
useCookie
(
STORY_LANGUAGE
,
language
);
const
[
langCache
,
setLangCache
]
=
useCookie
(
STORY_LANGUAGE
,
language
);
const
[
serviceVersion
,
setServiceVersion
]
=
useState
<
string
>
(
''
);
useEffect
(()
=>
{
useEffect
(()
=>
{
setLangCache
(
language
);
setLangCache
(
language
);
...
@@ -60,6 +63,12 @@ const GlobalHeaderRight: React.FC = () => {
...
@@ -60,6 +63,12 @@ const GlobalHeaderRight: React.FC = () => {
})))();
})))();
},
[
theme
,
language
]);
},
[
theme
,
language
]);
useEffect
(()
=>
{
queryDataByParams
<
string
>
(
API_CONSTANTS
.
GET_SERVICE_VERSION
).
then
((
res
)
=>
{
if
(
res
)
setServiceVersion
(
res
);
});
},
[]);
if
(
!
initialState
||
!
initialState
.
settings
)
{
if
(
!
initialState
||
!
initialState
.
settings
)
{
return
null
;
return
null
;
}
}
...
@@ -67,7 +76,7 @@ const GlobalHeaderRight: React.FC = () => {
...
@@ -67,7 +76,7 @@ const GlobalHeaderRight: React.FC = () => {
/**
/**
* css
* css
*/
*/
const
actionClassName
=
{
const
actionClassName
:
any
=
{
display
:
'flex'
,
display
:
'flex'
,
float
:
'right'
,
float
:
'right'
,
justifyContent
:
'center'
,
justifyContent
:
'center'
,
...
@@ -114,7 +123,7 @@ const GlobalHeaderRight: React.FC = () => {
...
@@ -114,7 +123,7 @@ const GlobalHeaderRight: React.FC = () => {
style
:
fullScreenClassName
style
:
fullScreenClassName
};
};
const
menuVersion
=
l
(
'menu.version'
,
''
,
{
version
:
VERSION
});
const
menuVersion
=
l
(
'menu.version'
,
''
,
{
version
:
serviceVersion
});
return
(
return
(
<>
<>
<
Tooltip
<
Tooltip
...
@@ -122,9 +131,9 @@ const GlobalHeaderRight: React.FC = () => {
...
@@ -122,9 +131,9 @@ const GlobalHeaderRight: React.FC = () => {
title=
{
<
span
>
{
fullScreen
?
l
(
'global.fullScreen'
)
:
l
(
'global.fullScreen.exit'
)
}
</
span
>
}
title=
{
<
span
>
{
fullScreen
?
l
(
'global.fullScreen'
)
:
l
(
'global.fullScreen.exit'
)
}
</
span
>
}
>
>
{
fullScreen
?
(
{
fullScreen
?
(
<
FullscreenOutlined
{
...
fullScreenProps
}
onClick=
{
screenFull
}
/>
<
FullscreenOutlined
{
...
(
fullScreenProps
as
any
)
}
onClick=
{
screenFull
}
/>
)
:
(
)
:
(
<
FullscreenExitOutlined
{
...
fullScreenProps
}
onClick=
{
screenFull
}
/>
<
FullscreenExitOutlined
{
...
(
fullScreenProps
as
any
)
}
onClick=
{
screenFull
}
/>
)
}
)
}
</
Tooltip
>
</
Tooltip
>
<
Tooltip
placement=
'bottom'
title=
{
<
span
>
{
menuVersion
}
</
span
>
}
>
<
Tooltip
placement=
'bottom'
title=
{
<
span
>
{
menuVersion
}
</
span
>
}
>
...
...
dinky-web/src/services/constants.tsx
View file @
b47ed7d3
...
@@ -25,11 +25,6 @@ import { ModalFormProps } from '@ant-design/pro-form/es/layouts/ModalForm';
...
@@ -25,11 +25,6 @@ import { ModalFormProps } from '@ant-design/pro-form/es/layouts/ModalForm';
*/
*/
export
const
TENANT_ID
=
'tenantId'
;
export
const
TENANT_ID
=
'tenantId'
;
/**
* the platform version
*/
export
const
VERSION
=
'1.0.0-rc2'
;
/**
/**
* the platform language
* the platform language
*/
*/
...
...
dinky-web/src/services/endpoints.tsx
View file @
b47ed7d3
...
@@ -18,6 +18,8 @@
...
@@ -18,6 +18,8 @@
*/
*/
export
enum
API_CONSTANTS
{
export
enum
API_CONSTANTS
{
GET_SERVICE_VERSION
=
'/api/version'
,
// --- user ---
// --- user ---
// login path
// login path
LOGIN_PATH
=
'/user/login'
,
LOGIN_PATH
=
'/user/login'
,
...
...
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