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
81e1f194
Unverified
Commit
81e1f194
authored
Feb 26, 2024
by
Zzm0809
Committed by
GitHub
Feb 26, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Optimization] optimize some image addresses as relative paths (#3178)
Co-authored-by:
Zzm0809
<
Zzm0809@users.noreply.github.com
>
parent
a76634a8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
23 additions
and
16 deletions
+23
-16
application-h2.yml
dinky-admin/src/main/resources/application-h2.yml
+1
-1
config.ts
dinky-web/config/config.ts
+4
-1
defaultSettings.ts
dinky-web/config/defaultSettings.ts
+1
-1
app.tsx
dinky-web/src/app.tsx
+5
-3
index.tsx
dinky-web/src/components/Footer/index.tsx
+1
-1
Sse.tsx
dinky-web/src/models/Sse.tsx
+2
-1
index.tsx
...b/src/pages/Other/Login/LoginForm/MainWithStyle/index.tsx
+1
-1
endpoints.tsx
dinky-web/src/services/endpoints.tsx
+8
-7
No files found.
dinky-admin/src/main/resources/application-h2.yml
View file @
81e1f194
...
@@ -27,7 +27,7 @@ spring:
...
@@ -27,7 +27,7 @@ spring:
h2
:
h2
:
console
:
console
:
enabled
:
true
enabled
:
true
path
:
/h2
path
:
/
api/
h2
sql
:
sql
:
init
:
init
:
schema-locations
:
classpath:db/db-h2-ddl.sql
schema-locations
:
classpath:db/db-h2-ddl.sql
...
...
dinky-web/config/config.ts
View file @
81e1f194
...
@@ -24,6 +24,7 @@ import routes from './routes';
...
@@ -24,6 +24,7 @@ import routes from './routes';
const
{
REACT_APP_ENV
=
'dev'
}
=
process
.
env
;
const
{
REACT_APP_ENV
=
'dev'
}
=
process
.
env
;
// @ts-ignore
export
default
defineConfig
({
export
default
defineConfig
({
/**
/**
* tags router:
* tags router:
...
@@ -44,6 +45,7 @@ export default defineConfig({
...
@@ -44,6 +45,7 @@ export default defineConfig({
*/
*/
hash
:
true
,
hash
:
true
,
esbuildMinifyIIFE
:
true
,
esbuildMinifyIIFE
:
true
,
publicPath
:
process
.
env
.
NODE_ENV
===
'production'
?
'./'
:
'/'
,
history
:
{
history
:
{
type
:
'hash'
type
:
'hash'
},
},
...
@@ -86,6 +88,7 @@ export default defineConfig({
...
@@ -86,6 +88,7 @@ export default defineConfig({
* @doc 代理介绍 https://umijs.org/docs/guides/proxy
* @doc 代理介绍 https://umijs.org/docs/guides/proxy
* @doc 代理配置 https://umijs.org/docs/api/config#proxy
* @doc 代理配置 https://umijs.org/docs/api/config#proxy
*/
*/
// @ts-ignore
proxy
:
proxy
[
REACT_APP_ENV
as
keyof
typeof
proxy
],
proxy
:
proxy
[
REACT_APP_ENV
as
keyof
typeof
proxy
],
/**
/**
* @name 快速热更新配置
* @name 快速热更新配置
...
@@ -166,7 +169,7 @@ export default defineConfig({
...
@@ -166,7 +169,7 @@ export default defineConfig({
*/
*/
headScripts
:
[
headScripts
:
[
// 解决首次加载时白屏的问题
// 解决首次加载时白屏的问题
{
src
:
'/scripts/loading.js'
,
async
:
true
}
{
src
:
'
.
/scripts/loading.js'
,
async
:
true
}
],
],
//================ pro 插件配置 =================
//================ pro 插件配置 =================
presets
:
[
'umi-presets-pro'
],
presets
:
[
'umi-presets-pro'
],
...
...
dinky-web/config/defaultSettings.ts
View file @
81e1f194
...
@@ -35,7 +35,7 @@ const Settings: ProLayoutProps & {
...
@@ -35,7 +35,7 @@ const Settings: ProLayoutProps & {
// 这里不能删除,需要先设置,否则会导致页面白屏, 然后在 layout 进行重新赋值
// 这里不能删除,需要先设置,否则会导致页面白屏, 然后在 layout 进行重新赋值
title
:
'Dinky Real-time Platform '
,
title
:
'Dinky Real-time Platform '
,
pwa
:
true
,
pwa
:
true
,
logo
:
'/dinky.svg'
,
logo
:
'
.
/dinky.svg'
,
iconfontUrl
:
''
,
iconfontUrl
:
''
,
splitMenus
:
true
,
splitMenus
:
true
,
menu
:
{
menu
:
{
...
...
dinky-web/src/app.tsx
View file @
81e1f194
...
@@ -41,7 +41,7 @@ import { API } from './services/data';
...
@@ -41,7 +41,7 @@ import { API } from './services/data';
// const isDev = process.env.NODE_ENV === "development";
// const isDev = process.env.NODE_ENV === "development";
const
loginPath
=
API_CONSTANTS
.
LOGIN_PATH
;
const
loginPath
=
API_CONSTANTS
.
LOGIN_PATH
;
const
whiteList
=
[
'/user'
,
'/user/login'
];
const
whiteList
=
[
'/user'
,
loginPath
];
let
extraRoutes
:
SysMenu
[]
=
[];
let
extraRoutes
:
SysMenu
[]
=
[];
let
rendered
=
false
;
let
rendered
=
false
;
...
@@ -65,7 +65,7 @@ const queryUserInfo = async () => {
...
@@ -65,7 +65,7 @@ const queryUserInfo = async () => {
const
currentUser
:
API
.
CurrentUser
=
{
const
currentUser
:
API
.
CurrentUser
=
{
user
:
{
user
:
{
...
user
,
...
user
,
avatar
:
user
.
avatar
??
'/icons/user_avatar.png'
avatar
:
user
.
avatar
??
'
.
/icons/user_avatar.png'
},
},
roleList
:
roleList
,
roleList
:
roleList
,
tenantList
:
tenantList
,
tenantList
:
tenantList
,
...
@@ -183,7 +183,9 @@ export const layout: RunTimeLayoutConfig = ({ initialState }) => {
...
@@ -183,7 +183,9 @@ export const layout: RunTimeLayoutConfig = ({ initialState }) => {
* @doc https://umijs.org/docs/max/request#配置
* @doc https://umijs.org/docs/max/request#配置
*/
*/
export
const
request
=
{
export
const
request
=
{
...
errorConfig
...
errorConfig
,
// 修改为相对请求路径, 避免请求路径出现错误 会自动拼接为完整请求路径
baseURL
:
API_CONSTANTS
.
BASE_URL
};
};
// 这个是redux-persist 的配置
// 这个是redux-persist 的配置
...
...
dinky-web/src/components/Footer/index.tsx
View file @
81e1f194
...
@@ -27,7 +27,7 @@ const Footer: React.FC = () => {
...
@@ -27,7 +27,7 @@ const Footer: React.FC = () => {
return
(
return
(
<
DefaultFooter
<
DefaultFooter
style=
{
{
style=
{
{
background
:
'url(/icons/footer-bg.svg) 100% 100% no-repeat'
,
background
:
'url(
.
/icons/footer-bg.svg) 100% 100% no-repeat'
,
backgroundSize
:
'cover'
,
backgroundSize
:
'cover'
,
bottom
:
0
bottom
:
0
}
}
}
}
...
...
dinky-web/src/models/Sse.tsx
View file @
81e1f194
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
import
{
postAll
}
from
'@/services/api'
;
import
{
postAll
}
from
'@/services/api'
;
import
{
ErrorMessage
}
from
'@/utils/messages'
;
import
{
ErrorMessage
}
from
'@/utils/messages'
;
import
{
useEffect
,
useRef
,
useState
}
from
'react'
;
import
{
useEffect
,
useRef
,
useState
}
from
'react'
;
// @ts-ignore
import
{
v4
as
uuidv4
}
from
'uuid'
;
import
{
v4
as
uuidv4
}
from
'uuid'
;
const
session_invalid_label
=
'SESSION_INVALID'
;
const
session_invalid_label
=
'SESSION_INVALID'
;
...
@@ -51,7 +52,7 @@ export default () => {
...
@@ -51,7 +52,7 @@ export default () => {
};
};
const
reconnectSse
=
()
=>
{
const
reconnectSse
=
()
=>
{
uuidRef
.
current
=
uuidv4
();
uuidRef
.
current
=
uuidv4
();
const
sseUrl
=
'
/
api/sse/connect?sessionKey='
+
uuidRef
.
current
;
const
sseUrl
=
'api/sse/connect?sessionKey='
+
uuidRef
.
current
;
eventSource
?.
close
();
eventSource
?.
close
();
setEventSource
(
new
EventSource
(
sseUrl
));
setEventSource
(
new
EventSource
(
sseUrl
));
};
};
...
...
dinky-web/src/pages/Other/Login/LoginForm/MainWithStyle/index.tsx
View file @
81e1f194
...
@@ -25,7 +25,7 @@ const MainWithStyle = (props: any) => {
...
@@ -25,7 +25,7 @@ const MainWithStyle = (props: any) => {
const
{
children
}
=
props
;
const
{
children
}
=
props
;
return
(
return
(
<
div
className=
{
style
.
loginformMain
}
style=
{
{
backgroundImage
:
`url('/icons/main-bg.svg')`
}
}
>
<
div
className=
{
style
.
loginformMain
}
style=
{
{
backgroundImage
:
`url('
.
/icons/main-bg.svg')`
}
}
>
<
img
className=
{
style
.
logo
}
src=
{
Settings
.
logo
}
/>
<
img
className=
{
style
.
logo
}
src=
{
Settings
.
logo
}
/>
<
div
className=
{
style
.
form
}
>
<
div
className=
{
style
.
form
}
>
<
div
className=
{
style
.
top
}
>
<
div
className=
{
style
.
top
}
>
...
...
dinky-web/src/services/endpoints.tsx
View file @
81e1f194
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
*/
*/
export
enum
API_CONSTANTS
{
export
enum
API_CONSTANTS
{
BASE_URL
=
'.'
,
GET_SERVICE_VERSION
=
'/api/version'
,
GET_SERVICE_VERSION
=
'/api/version'
,
// --- user ---
// --- user ---
...
@@ -236,12 +237,12 @@ export enum API_CONSTANTS {
...
@@ -236,12 +237,12 @@ export enum API_CONSTANTS {
REFRESH_JOB_DETAIL
=
'/api/jobInstance/refreshJobInfoDetail'
,
REFRESH_JOB_DETAIL
=
'/api/jobInstance/refreshJobInfoDetail'
,
READ_CHECKPOINT
=
'/api/flinkConf/readCheckPoint'
,
READ_CHECKPOINT
=
'/api/flinkConf/readCheckPoint'
,
GET_JOB_VERSION
=
'/api/task/version'
,
GET_JOB_VERSION
=
'/api/task/version'
,
GET_JOBMANAGER_LOG
=
'api/jobInstance/getJobManagerLog'
,
GET_JOBMANAGER_LOG
=
'
/
api/jobInstance/getJobManagerLog'
,
GET_JOBMANAGER_STDOUT
=
'api/jobInstance/getJobManagerStdOut'
,
GET_JOBMANAGER_STDOUT
=
'
/
api/jobInstance/getJobManagerStdOut'
,
GET_JOBMANAGER_THREAD_DUMP
=
'api/jobInstance/getJobManagerThreadDump'
,
GET_JOBMANAGER_THREAD_DUMP
=
'
/
api/jobInstance/getJobManagerThreadDump'
,
GET_TASKMANAGER_LIST
=
'api/jobInstance/getTaskManagerList'
,
GET_TASKMANAGER_LIST
=
'
/
api/jobInstance/getTaskManagerList'
,
GET_TASKMANAGER_LOG
=
'api/jobInstance/getTaskManagerLog'
,
GET_TASKMANAGER_LOG
=
'
/
api/jobInstance/getTaskManagerLog'
,
GET_JOB_METRICS_ITEMS
=
'api/jobInstance/getJobMetricsItems'
,
GET_JOB_METRICS_ITEMS
=
'
/
api/jobInstance/getJobMetricsItems'
,
CANCEL_JOB
=
'/api/task/cancel'
,
CANCEL_JOB
=
'/api/task/cancel'
,
// /api/studio/getLineage
// /api/studio/getLineage
STUDIO_GET_LINEAGE
=
'/api/studio/getLineage'
,
STUDIO_GET_LINEAGE
=
'/api/studio/getLineage'
,
...
@@ -263,7 +264,7 @@ export enum API_CONSTANTS {
...
@@ -263,7 +264,7 @@ export enum API_CONSTANTS {
LDAP_IMPORT_USERS
=
'/api/ldap/importUsers'
,
LDAP_IMPORT_USERS
=
'/api/ldap/importUsers'
,
// -- home
// -- home
GET_STATUS_COUNT
=
'api/jobInstance/getStatusCount'
,
GET_STATUS_COUNT
=
'
/
api/jobInstance/getStatusCount'
,
GET_RESOURCE_OVERVIEW
=
'/api/home/getResourceOverview'
,
GET_RESOURCE_OVERVIEW
=
'/api/home/getResourceOverview'
,
GET_JOB_STATUS_OVERVIEW
=
'/api/home/getJobStatusOverview'
,
GET_JOB_STATUS_OVERVIEW
=
'/api/home/getJobStatusOverview'
,
GET_JOB_TYPE_OVERVIEW
=
'/api/home/getJobTypeOverview'
,
GET_JOB_TYPE_OVERVIEW
=
'/api/home/getJobTypeOverview'
,
...
...
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