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
0769adf8
Unverified
Commit
0769adf8
authored
Dec 14, 2023
by
gaoyan
Committed by
GitHub
Dec 14, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix UI (#2644)
* 优化UI显示 * Optimized the alert template
parent
f02ce97c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
21 deletions
+32
-21
defaultSettings.ts
dinky-web/config/defaultSettings.ts
+1
-1
index.tsx
dinky-web/src/components/RightContent/index.tsx
+8
-2
index.tsx
dinky-web/src/pages/Metrics/JobMetricsList/index.tsx
+1
-1
index.tsx
dinky-web/src/pages/RegCenter/Alert/AlertTemplate/index.tsx
+22
-17
No files found.
dinky-web/config/defaultSettings.ts
View file @
0769adf8
...
...
@@ -60,7 +60,7 @@ const Settings: ProLayoutProps & {
colorBgMenuItemSelected
:
'#3399FF'
},
pageContainer
:
{
paddingBlockPageContainerContent
:
5
,
paddingBlockPageContainerContent
:
2
5
,
paddingInlinePageContainerContent
:
10
}
}
...
...
dinky-web/src/components/RightContent/index.tsx
View file @
0769adf8
...
...
@@ -43,13 +43,19 @@ const GlobalHeaderRight: React.FC = () => {
useEffect
(()
=>
{
setLangCache
(
language
);
(
async
()
=>
await
setInitialState
((
initialStateType
)
=>
({
await
setInitialState
((
initialStateType
:
any
)
=>
({
...
initialStateType
,
locale
:
language
,
settings
:
{
...
initialStateType
?.
settings
,
navTheme
:
theme
,
colorMenuBackground
:
theme
===
THEME
.
dark
?
'transparent'
:
'#fff'
token
:{
...
initialStateType
?.
settings
?.
token
,
sider
:
{
...
initialStateType
?.
settings
?.
token
?.
sider
,
colorMenuBackground
:
theme
===
THEME
.
dark
?
'#000'
:
'#fff'
,
}
},
}
})))();
},
[
theme
,
language
]);
...
...
dinky-web/src/pages/Metrics/JobMetricsList/index.tsx
View file @
0769adf8
...
...
@@ -115,7 +115,7 @@ const JobMetricsList = (props: MetricsProps) => {
{
data
!=
undefined
&&
data
.
map
((
lo
:
any
)
=>
{
return
(
<
Spin
spinning=
{
loading
}
>
<
Spin
spinning=
{
loading
}
key=
{
`spin-${lo.layoutName}`
}
>
<
ProCard
key=
{
lo
.
layoutName
}
title=
{
lo
.
layoutName
}
collapsible
ghost
gutter=
{
[
0
,
8
]
}
>
<
Row
gutter=
{
[
8
,
16
]
}
>
{
renderFlinkChartGroup
(
lo
.
flinkJobId
,
lo
.
metrics
)
}
</
Row
>
</
ProCard
>
...
...
dinky-web/src/pages/RegCenter/Alert/AlertTemplate/index.tsx
View file @
0769adf8
...
...
@@ -30,9 +30,11 @@ import { l } from '@/utils/intl';
import
{
useRequest
}
from
'@@/exports'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
PageContainer
}
from
'@ant-design/pro-layout'
;
import
{
Button
,
Card
,
List
,
Modal
}
from
'antd'
;
import
{
useState
}
from
'react'
;
import
{
Button
,
Card
,
Input
,
List
,
Modal
}
from
'antd'
;
import
React
,
{
useState
}
from
'react'
;
import
Markdown
from
'react-markdown'
;
import
{
ProList
}
from
"@ant-design/pro-components"
;
import
{
CreateBtn
}
from
"@/components/CallBackButton/CreateBtn"
;
export
default
()
=>
{
const
[
alertTemplateState
,
setAlertTemplateState
]
=
...
...
@@ -108,6 +110,20 @@ export default () => {
];
};
const
renderToolBar
=
()
=>
{
return
()
=>
[
<
Authorized
key=
'create'
path=
'/registration/alert/template/add'
>
<
CreateBtn
key=
{
'CreateAlertTemplateBtn'
}
onClick=
{
()
=>
setAlertTemplateState
((
prevState
)
=>
({
...
prevState
,
addedOpen
:
true
}))
}
/>
</
Authorized
>
];
};
/**
* Draw a template Card
*/
...
...
@@ -148,26 +164,15 @@ export default () => {
};
return
(
<
PageContainer
>
<
Button
style=
{
{
width
:
'100%'
,
margin
:
'10px 0'
}
}
type=
{
'dashed'
}
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
setAlertTemplateState
((
prevState
)
=>
({
...
prevState
,
addedOpen
:
true
}))
}
>
{
l
(
'button.create'
)
}
</
Button
>
<
List
<
Alert
.
AlertTemplate
>
<
PageContainer
title=
{
false
}
>
<
ProList
<
Alert
.
AlertTemplate
>
headerTitle=
{
l
(
'menu.registration.alert.template'
)
}
rowKey='id'
loading=
{
loading
}
grid=
{
{
gutter
:
16
,
xs
:
1
,
sm
:
2
,
md
:
3
,
lg
:
3
,
xl
:
4
,
xxl
:
4
}
}
dataSource=
{
data
??
[]
}
renderItem=
{
(
item
)
=>
renderTemplateCard
(
item
)
}
toolBarRender=
{
renderToolBar
()
}
/
>
<
AlertTemplateForm
...
...
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