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
f4183616
Unverified
Commit
f4183616
authored
Oct 06, 2023
by
gaoyan
Committed by
GitHub
Oct 06, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
formate code (#2352)
parent
67bd6278
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
267 additions
and
253 deletions
+267
-253
AvatarDropdown.tsx
dinky-web/src/components/RightContent/AvatarDropdown.tsx
+8
-2
global.ts
dinky-web/src/locales/en-US/global.ts
+181
-181
index.tsx
dinky-web/src/pages/DataStudio/HeaderContainer/index.tsx
+0
-1
JobManagerLogsTab.tsx
...DevOps/JobDetail/JobLogs/components/JobManagerLogsTab.tsx
+14
-4
index.tsx
dinky-web/src/pages/DevOps/JobList/index.tsx
+1
-1
index.tsx
dinky-web/src/pages/Home/JobOverView/JobErrorView/index.tsx
+7
-7
index.tsx
dinky-web/src/pages/Home/JobOverView/index.tsx
+56
-57
No files found.
dinky-web/src/components/RightContent/AvatarDropdown.tsx
View file @
f4183616
...
...
@@ -19,7 +19,13 @@ import { chooseTenantSubmit, outLogin } from '@/services/BusinessCrud';
import
{
setTenantStorageAndCookie
}
from
'@/utils/function'
;
import
{
l
}
from
'@/utils/intl'
;
import
{
ErrorNotification
,
SuccessNotification
}
from
'@/utils/messages'
;
import
{
ClearOutlined
,
LogoutOutlined
,
TeamOutlined
,
UserOutlined
,
UserSwitchOutlined
}
from
'@ant-design/icons'
;
import
{
ClearOutlined
,
LogoutOutlined
,
TeamOutlined
,
UserOutlined
,
UserSwitchOutlined
}
from
'@ant-design/icons'
;
import
{
setAlpha
}
from
'@ant-design/pro-components'
;
import
{
useEmotionCss
}
from
'@ant-design/use-emotion-css'
;
import
{
history
,
useModel
}
from
'@umijs/max'
;
...
...
@@ -216,7 +222,7 @@ const AvatarDropdown = () => {
key
:
'clearPageCache'
,
icon
:
<
ClearOutlined
/>,
label
:
l
(
'menu.account.clearPageCache'
),
onClick
:
()
=>
{
onClick
:
()
=>
{
window
.
localStorage
.
removeItem
(
'persist:root'
);
window
.
location
.
reload
();
}
...
...
dinky-web/src/locales/en-US/global.ts
View file @
f4183616
...
...
@@ -18,185 +18,185 @@
*/
export
default
{
'button.create'
:
'Create'
,
'button.close'
:
'Close'
,
'button.confirm'
:
'Confirm'
,
'button.recovery'
:
'Recovery'
,
'button.cancel'
:
'Cancel'
,
'button.finish'
:
'Finish'
,
'button.back'
:
'Back'
,
'button.save'
:
'Save'
,
'button.delete'
:
'Delete'
,
'button.batchDelete'
:
'Batch Delete'
,
'button.batchEnable'
:
'Batch Enable'
,
'button.batchDisable'
:
'Batch Disable'
,
'button.more'
:
'More'
,
'button.config'
:
'Config'
,
'button.modify'
:
'Modify'
,
'button.edit'
:
'Edit'
,
'button.start'
:
'Start'
,
'button.stop'
:
'Stop'
,
'button.assignUser'
:
'Assign Users'
,
'button.assignRole'
:
'Assign Role'
,
'button.changePassword'
:
'Change Password'
,
'button.enable'
:
'Enable'
,
'button.disable'
:
'Disable'
,
'button.reset'
:
'Reset'
,
'button.search'
:
'Search'
,
'button.upload'
:
'Upload'
,
'button.import'
:
'Import'
,
'button.export'
:
'Export'
,
'button.submit'
:
'Submit'
,
'button.createDir'
:
'Create Directory'
,
'button.heartbeat'
:
'Heartbeat'
,
'button.recycle'
:
'Recycle'
,
'button.refresh'
:
'Refresh'
,
'button.expand-all'
:
'Expand All'
,
'button.collapse-all'
:
'Collapse All'
,
'button.test'
:
'Test'
,
'button.clear'
:
'Clear'
,
'button.copy'
:
'Copy'
,
'button.refreshData'
:
'Refresh Data'
,
'button.collapseDir'
:
'Collapse Directory'
,
'button.asc'
:
'ASC'
,
'button.desc'
:
'DESC'
,
'button.query'
:
'Query'
,
'button.exit'
:
'Exit'
,
'button.build'
:
'Build'
,
'button.next'
:
'Next'
,
'button.prev'
:
'Previous'
,
'button.showLog'
:
'Show Log'
,
'button.showCode'
:
'Show Code'
,
'button.backTop'
:
'Back Top'
,
'button.backBottom'
:
'Back Bottom'
,
'button.downScroll'
:
'Down Scroll'
,
'button.upScroll'
:
'Up Scroll'
,
'button.stopRefresh'
:
'Stop Auto Refresh'
,
'button.startRefresh'
:
'Start Auto Refresh(5s/e)'
,
'menu.menu'
:
'Menu'
,
'right.menu.open'
:
'Open'
,
'right.menu.submit'
:
'Sync Submit'
,
'right.menu.addSub'
:
'Add Sub Item'
,
'right.menu.createSubFolder'
:
'Create Sub Folder'
,
'right.menu.exportJson'
:
'Export JSON'
,
'right.menu.importJson'
:
'Import JSON'
,
'right.menu.rename'
:
'Rename'
,
'right.menu.refresh'
:
'Refresh'
,
'right.menu.createFolder'
:
'Create Folder'
,
'right.menu.copy'
:
'Copy'
,
'right.menu.cut'
:
'Cut'
,
'right.menu.paste'
:
'Paste'
,
'right.menu.delete'
:
'Delete'
,
'right.menu.createCatalogue'
:
'Create Directory'
,
'right.menu.createRoot'
:
'Create Root Directory'
,
'right.menu.uploadZipToCreate'
:
'Upload Zip To Create'
,
'right.menu.createTask'
:
'Create Task'
,
'right.menu.closeAll'
:
'Close All'
,
'right.menu.closeOther'
:
'Close Others'
,
'tips.selected'
:
'Selected {total} Item'
,
'tips.notSelected'
:
'Not Select'
,
'tips.enter'
:
'Please Enter'
,
'tips.confirm.delete.table'
:
' Are you sure you want to delete table [{tableName}]?'
,
'status.enabled'
:
'Enabled'
,
'status.disabled'
:
'Disabled'
,
'global.time.second'
:
'S '
,
'global.time.minute'
:
'M '
,
'global.time.hour'
:
'H '
,
'global.time.day'
:
'D '
,
'global.time.millisecond'
:
'ms '
,
'global.stay.tuned'
:
'Stay tuned'
,
'global.mini'
:
'Mini Size'
,
'global.max'
:
'Max Size'
,
'global.table.operate'
:
'Operation'
,
'global.table.config'
:
'Config'
,
'global.table.edit'
:
'Edit'
,
'global.table.delete'
:
'Delete'
,
'global.table.more'
:
'More'
,
'global.table.updateTime'
:
'Update Time'
,
'global.table.lastUpdateTime'
:
'Last Update Time'
,
'global.table.createTime'
:
'Create Time'
,
'global.table.startTime'
:
'Start Time'
,
'global.table.startUpTime'
:
'StartUp Time'
,
'global.table.endTime'
:
'End Time'
,
'global.table.finishTime'
:
'Finished Time'
,
'global.table.useTime'
:
'Duration'
,
'global.table.registType'
:
'Regist Type'
,
'global.table.registType.manual'
:
'Manual'
,
'global.table.registType.automatic'
:
'Automatic'
,
'global.table.isEnable'
:
'Is Enable'
,
'global.table.note'
:
'Note'
,
'global.table.status'
:
'Status'
,
'global.table.jobid'
:
'Job ID'
,
'global.table.notePlaceholder'
:
'please input Note'
,
'global.table.status.normal'
:
'Normal'
,
'global.table.status.abnormal'
:
'Abnormal'
,
'global.table.jobname'
:
'Job Name'
,
'global.table.lifecycle'
:
'Life Cycle'
,
'global.table.lifecycle.all'
:
'All'
,
'global.table.lifecycle.dev'
:
'Develop'
,
'global.table.execmode.batch'
:
'Batch Mode'
,
'global.table.execmode.streaming'
:
'Stream Mode'
,
'global.table.lifecycle.publish'
:
'Publish'
,
'global.table.lifecycle.online'
:
'Online'
,
'global.table.lifecycle.unknown'
:
'Unknown'
,
'global.table.execmode'
:
'Execution mode'
,
'global.table.runmode'
:
'Run Mode'
,
'global.table.runmode.local'
:
'Local'
,
'global.table.runmode.remote'
:
'Remote'
,
'global.search.text'
:
'Input Key to Search'
,
'global.savepoint.strategy.disabled'
:
'Disabled'
,
'global.savepoint.strategy.latest'
:
'Latest'
,
'global.savepoint.strategy.earliest'
:
'Earliest'
,
'global.savepoint.strategy.custom'
:
'Custom'
,
'global.fullScreen'
:
'FullScreen'
,
'global.fullScreen.exit'
:
'Exit FullScreen'
,
'global.yes'
:
'Yes'
,
'global.no'
:
'No'
,
'global.info'
:
'Info'
,
'global.error'
:
'Error'
,
'global.result'
:
'Result'
,
'global.warning'
:
'Warning'
,
'global.success'
:
'Success'
,
'global.getdata.tips'
:
'Get Data'
,
'global.notification.iknow'
:
'I understand'
,
'global.notification.full-error'
:
'Complete error message'
,
'global.item'
:
'Pieces'
,
'global.bout'
:
'Times'
,
'global.size'
:
' Size: {size}'
,
'global.week.sunday'
:
'Sunday'
,
'global.week.monday'
:
'Monday'
,
'global.week.tuesday'
:
'Tuesday'
,
'global.week.wednesday'
:
'Wednesday'
,
'global.week.thursday'
:
'Thursday'
,
'global.week.friday'
:
'Friday'
,
'global.week.saturday'
:
'Saturday'
,
'global.month.january'
:
'January'
,
'global.month.february'
:
'February'
,
'global.month.march'
:
'March'
,
'global.month.april'
:
'April'
,
'global.month.may'
:
'May'
,
'global.month.june'
:
'June'
,
'global.month.july'
:
'July'
,
'global.month.august'
:
'August'
,
'global.month.september'
:
'September'
,
'global.month.october'
:
'October'
,
'global.month.november'
:
'November'
,
'global.month.december'
:
'December'
'button.create'
:
'Create'
,
'button.close'
:
'Close'
,
'button.confirm'
:
'Confirm'
,
'button.recovery'
:
'Recovery'
,
'button.cancel'
:
'Cancel'
,
'button.finish'
:
'Finish'
,
'button.back'
:
'Back'
,
'button.save'
:
'Save'
,
'button.delete'
:
'Delete'
,
'button.batchDelete'
:
'Batch Delete'
,
'button.batchEnable'
:
'Batch Enable'
,
'button.batchDisable'
:
'Batch Disable'
,
'button.more'
:
'More'
,
'button.config'
:
'Config'
,
'button.modify'
:
'Modify'
,
'button.edit'
:
'Edit'
,
'button.start'
:
'Start'
,
'button.stop'
:
'Stop'
,
'button.assignUser'
:
'Assign Users'
,
'button.assignRole'
:
'Assign Role'
,
'button.changePassword'
:
'Change Password'
,
'button.enable'
:
'Enable'
,
'button.disable'
:
'Disable'
,
'button.reset'
:
'Reset'
,
'button.search'
:
'Search'
,
'button.upload'
:
'Upload'
,
'button.import'
:
'Import'
,
'button.export'
:
'Export'
,
'button.submit'
:
'Submit'
,
'button.createDir'
:
'Create Directory'
,
'button.heartbeat'
:
'Heartbeat'
,
'button.recycle'
:
'Recycle'
,
'button.refresh'
:
'Refresh'
,
'button.expand-all'
:
'Expand All'
,
'button.collapse-all'
:
'Collapse All'
,
'button.test'
:
'Test'
,
'button.clear'
:
'Clear'
,
'button.copy'
:
'Copy'
,
'button.refreshData'
:
'Refresh Data'
,
'button.collapseDir'
:
'Collapse Directory'
,
'button.asc'
:
'ASC'
,
'button.desc'
:
'DESC'
,
'button.query'
:
'Query'
,
'button.exit'
:
'Exit'
,
'button.build'
:
'Build'
,
'button.next'
:
'Next'
,
'button.prev'
:
'Previous'
,
'button.showLog'
:
'Show Log'
,
'button.showCode'
:
'Show Code'
,
'button.backTop'
:
'Back Top'
,
'button.backBottom'
:
'Back Bottom'
,
'button.downScroll'
:
'Down Scroll'
,
'button.upScroll'
:
'Up Scroll'
,
'button.stopRefresh'
:
'Stop Auto Refresh'
,
'button.startRefresh'
:
'Start Auto Refresh(5s/e)'
,
'menu.menu'
:
'Menu'
,
'right.menu.open'
:
'Open'
,
'right.menu.submit'
:
'Sync Submit'
,
'right.menu.addSub'
:
'Add Sub Item'
,
'right.menu.createSubFolder'
:
'Create Sub Folder'
,
'right.menu.exportJson'
:
'Export JSON'
,
'right.menu.importJson'
:
'Import JSON'
,
'right.menu.rename'
:
'Rename'
,
'right.menu.refresh'
:
'Refresh'
,
'right.menu.createFolder'
:
'Create Folder'
,
'right.menu.copy'
:
'Copy'
,
'right.menu.cut'
:
'Cut'
,
'right.menu.paste'
:
'Paste'
,
'right.menu.delete'
:
'Delete'
,
'right.menu.createCatalogue'
:
'Create Directory'
,
'right.menu.createRoot'
:
'Create Root Directory'
,
'right.menu.uploadZipToCreate'
:
'Upload Zip To Create'
,
'right.menu.createTask'
:
'Create Task'
,
'right.menu.closeAll'
:
'Close All'
,
'right.menu.closeOther'
:
'Close Others'
,
'tips.selected'
:
'Selected {total} Item'
,
'tips.notSelected'
:
'Not Select'
,
'tips.enter'
:
'Please Enter'
,
'tips.confirm.delete.table'
:
' Are you sure you want to delete table [{tableName}]?'
,
'status.enabled'
:
'Enabled'
,
'status.disabled'
:
'Disabled'
,
'global.time.second'
:
'S '
,
'global.time.minute'
:
'M '
,
'global.time.hour'
:
'H '
,
'global.time.day'
:
'D '
,
'global.time.millisecond'
:
'ms '
,
'global.stay.tuned'
:
'Stay tuned'
,
'global.mini'
:
'Mini Size'
,
'global.max'
:
'Max Size'
,
'global.table.operate'
:
'Operation'
,
'global.table.config'
:
'Config'
,
'global.table.edit'
:
'Edit'
,
'global.table.delete'
:
'Delete'
,
'global.table.more'
:
'More'
,
'global.table.updateTime'
:
'Update Time'
,
'global.table.lastUpdateTime'
:
'Last Update Time'
,
'global.table.createTime'
:
'Create Time'
,
'global.table.startTime'
:
'Start Time'
,
'global.table.startUpTime'
:
'StartUp Time'
,
'global.table.endTime'
:
'End Time'
,
'global.table.finishTime'
:
'Finished Time'
,
'global.table.useTime'
:
'Duration'
,
'global.table.registType'
:
'Regist Type'
,
'global.table.registType.manual'
:
'Manual'
,
'global.table.registType.automatic'
:
'Automatic'
,
'global.table.isEnable'
:
'Is Enable'
,
'global.table.note'
:
'Note'
,
'global.table.status'
:
'Status'
,
'global.table.jobid'
:
'Job ID'
,
'global.table.notePlaceholder'
:
'please input Note'
,
'global.table.status.normal'
:
'Normal'
,
'global.table.status.abnormal'
:
'Abnormal'
,
'global.table.jobname'
:
'Job Name'
,
'global.table.lifecycle'
:
'Life Cycle'
,
'global.table.lifecycle.all'
:
'All'
,
'global.table.lifecycle.dev'
:
'Develop'
,
'global.table.execmode.batch'
:
'Batch Mode'
,
'global.table.execmode.streaming'
:
'Stream Mode'
,
'global.table.lifecycle.publish'
:
'Publish'
,
'global.table.lifecycle.online'
:
'Online'
,
'global.table.lifecycle.unknown'
:
'Unknown'
,
'global.table.execmode'
:
'Execution mode'
,
'global.table.runmode'
:
'Run Mode'
,
'global.table.runmode.local'
:
'Local'
,
'global.table.runmode.remote'
:
'Remote'
,
'global.search.text'
:
'Input Key to Search'
,
'global.savepoint.strategy.disabled'
:
'Disabled'
,
'global.savepoint.strategy.latest'
:
'Latest'
,
'global.savepoint.strategy.earliest'
:
'Earliest'
,
'global.savepoint.strategy.custom'
:
'Custom'
,
'global.fullScreen'
:
'FullScreen'
,
'global.fullScreen.exit'
:
'Exit FullScreen'
,
'global.yes'
:
'Yes'
,
'global.no'
:
'No'
,
'global.info'
:
'Info'
,
'global.error'
:
'Error'
,
'global.result'
:
'Result'
,
'global.warning'
:
'Warning'
,
'global.success'
:
'Success'
,
'global.getdata.tips'
:
'Get Data'
,
'global.notification.iknow'
:
'I understand'
,
'global.notification.full-error'
:
'Complete error message'
,
'global.item'
:
'Pieces'
,
'global.bout'
:
'Times'
,
'global.size'
:
' Size: {size}'
,
'global.week.sunday'
:
'Sunday'
,
'global.week.monday'
:
'Monday'
,
'global.week.tuesday'
:
'Tuesday'
,
'global.week.wednesday'
:
'Wednesday'
,
'global.week.thursday'
:
'Thursday'
,
'global.week.friday'
:
'Friday'
,
'global.week.saturday'
:
'Saturday'
,
'global.month.january'
:
'January'
,
'global.month.february'
:
'February'
,
'global.month.march'
:
'March'
,
'global.month.april'
:
'April'
,
'global.month.may'
:
'May'
,
'global.month.june'
:
'June'
,
'global.month.july'
:
'July'
,
'global.month.august'
:
'August'
,
'global.month.september'
:
'September'
,
'global.month.october'
:
'October'
,
'global.month.november'
:
'November'
,
'global.month.december'
:
'December'
};
dinky-web/src/pages/DataStudio/HeaderContainer/index.tsx
View file @
f4183616
...
...
@@ -44,7 +44,6 @@ import { SettingConfigKeyEnum } from '@/pages/SettingCenter/GlobalSetting/Settin
import
{
handlePutDataJson
}
from
'@/services/BusinessCrud'
;
import
{
BaseConfigProperties
}
from
'@/types/SettingCenter/data'
;
import
{
l
}
from
'@/utils/intl'
;
import
{
ErrorNotification
}
from
'@/utils/messages'
;
import
{
connect
}
from
'@@/exports'
;
import
{
EnvironmentOutlined
,
...
...
dinky-web/src/pages/DevOps/JobDetail/JobLogs/components/JobManagerLogsTab.tsx
View file @
f4183616
...
...
@@ -23,7 +23,7 @@ import { API_CONSTANTS } from '@/services/endpoints';
import
{
useRequest
}
from
'@@/exports'
;
import
{
ProCard
}
from
'@ant-design/pro-components'
;
import
{
Spin
,
Tabs
,
Typography
}
from
'antd'
;
import
{
EditorLanguage
}
from
"monaco-editor/esm/metadata"
;
import
{
EditorLanguage
}
from
'monaco-editor/esm/metadata'
;
const
{
Text
,
Paragraph
}
=
Typography
;
...
...
@@ -46,7 +46,7 @@ const JobManagerLogsTab = (props: JobProps) => {
params
:
{
address
:
jmaddr
}
});
const
getLog
=
(
ur
:
any
,
language
?:
EditorLanguage
)
=>
{
const
getLog
=
(
ur
:
any
,
language
?:
EditorLanguage
)
=>
{
return
(
<
Spin
spinning=
{
ur
.
loading
}
>
<
CodeShow
language=
{
language
}
code=
{
ur
.
data
?
ur
.
data
:
'No Log'
}
height=
{
600
}
/>
...
...
@@ -56,7 +56,17 @@ const JobManagerLogsTab = (props: JobProps) => {
const
getDump
=
(
ur
:
any
)
=>
{
return
(
<
Spin
spinning=
{
ur
.
loading
}
>
<
CodeShow
language=
{
"kotlin"
}
code=
{
ur
.
data
?
(
JSON
.
parse
(
ur
.
data
)[
'threadInfos'
]
as
any
[]).
map
(
x
=>
x
[
'stringifiedThreadInfo'
]).
join
(
""
)
:
'No Log'
}
height=
{
600
}
/>
<
CodeShow
language=
{
'kotlin'
}
code=
{
ur
.
data
?
(
JSON
.
parse
(
ur
.
data
)[
'threadInfos'
]
as
any
[])
.
map
((
x
)
=>
x
[
'stringifiedThreadInfo'
])
.
join
(
''
)
:
'No Log'
}
height=
{
600
}
/>
</
Spin
>
);
};
...
...
@@ -66,7 +76,7 @@ const JobManagerLogsTab = (props: JobProps) => {
<
Tabs
size=
{
'small'
}
items=
{
[
{
label
:
'Log'
,
key
:
'LOG'
,
children
:
getLog
(
log
,
"java"
)
},
{
label
:
'Log'
,
key
:
'LOG'
,
children
:
getLog
(
log
,
'java'
)
},
{
label
:
'Std Out'
,
key
:
'STDOUT'
,
children
:
getLog
(
stdout
)
},
{
label
:
'Thread Dump'
,
key
:
'DUMP'
,
children
:
getDump
(
dump
)
}
]
}
...
...
dinky-web/src/pages/DevOps/JobList/index.tsx
View file @
f4183616
...
...
@@ -6,7 +6,7 @@ import { queryList } from '@/services/api';
import
{
PROTABLE_OPTIONS_PUBLIC
}
from
'@/services/constants'
;
import
{
API_CONSTANTS
}
from
'@/services/endpoints'
;
import
{
Jobs
}
from
'@/types/DevOps/data'
;
import
{
parseMilliSecondStr
,
parseSecondStr
}
from
'@/utils/function'
;
import
{
parseMilliSecondStr
}
from
'@/utils/function'
;
import
{
l
}
from
'@/utils/intl'
;
import
{
ClockCircleTwoTone
,
EyeTwoTone
}
from
'@ant-design/icons'
;
import
type
{
ActionType
,
ProColumns
}
from
'@ant-design/pro-components'
;
...
...
dinky-web/src/pages/Home/JobOverView/JobErrorView/index.tsx
View file @
f4183616
...
...
@@ -47,43 +47,43 @@ const JobErrorView: React.FC = () => {
rank
:
2
,
name
:
'任务2'
,
value
:
20000
,
key
:
'任务2'
key
:
'任务2'
},
{
rank
:
3
,
name
:
'任务3'
,
value
:
30000
,
key
:
'任务3'
key
:
'任务3'
},
{
rank
:
4
,
name
:
'任务4'
,
value
:
40000
,
key
:
'任务4'
key
:
'任务4'
},
{
rank
:
5
,
name
:
'任务5'
,
value
:
50000
,
key
:
'任务5'
key
:
'任务5'
},
{
rank
:
6
,
name
:
'任务6'
,
value
:
60000
,
key
:
'任务6'
key
:
'任务6'
},
{
rank
:
7
,
name
:
'任务7'
,
value
:
70000
,
key
:
'任务7'
key
:
'任务7'
},
{
rank
:
8
,
name
:
'任务8'
,
value
:
80000
,
key
:
'任务8'
key
:
'任务8'
}
]);
...
...
dinky-web/src/pages/Home/JobOverView/index.tsx
View file @
f4183616
...
...
@@ -23,70 +23,69 @@ import JobRecoveryView from '@/pages/Home/JobOverView/JobRecoveryView';
import
JobRunView
from
'@/pages/Home/JobOverView/JobRunView'
;
import
JobStatusPie
from
'@/pages/Home/JobOverView/JobStatusPie'
;
import
LoadScoreGauge
from
'@/pages/Home/JobOverView/LoadScoreGauge'
;
import
{
l
}
from
'@/utils/intl'
;
import
{
ProCard
}
from
'@ant-design/pro-components'
;
import
{
Badge
}
from
'antd'
;
import
{
l
}
from
'@/utils/intl'
;
import
{
ProCard
}
from
'@ant-design/pro-components'
;
import
{
Badge
}
from
'antd'
;
import
RcResizeObserver
from
'rc-resize-observer'
;
import
React
,
{
useState
}
from
'react'
;
import
React
,
{
useState
}
from
'react'
;
const
noPadding
=
{
paddingInline
:
'0'
,
paddingBlock
:
'0'
paddingInline
:
'0'
,
paddingBlock
:
'0'
};
const
JobOverView
:
React
.
FC
=
()
=>
{
const
[
split
,
setSplit
]
=
useState
<
'vertical'
|
'horizontal'
|
undefined
>
(
'vertical'
);
const
[
split
,
setSplit
]
=
useState
<
'vertical'
|
'horizontal'
|
undefined
>
(
'vertical'
);
return
(
<
RcResizeObserver
.
Collection
>
<
RcResizeObserver
key=
'resize-observer'
onResize=
{
(
offset
)
=>
{
setSplit
(
offset
.
width
<
596
?
'horizontal'
:
'vertical'
);
}
}
>
<
ProCard
title=
{
<>
<
Badge
status=
'processing'
/>
{
l
(
'home.job.metrics'
)
}
</>
}
headerBordered
bordered
size=
'small'
split=
{
split
}
bodyStyle=
{
noPadding
}
>
<
ProCard
split=
{
split
}
bodyStyle=
{
noPadding
}
>
<
ProCard
split=
'horizontal'
>
<
ProCard
bodyStyle=
{
{
padding
:
'0 12px'
}
}
>
<
JobRunView
/>
</
ProCard
>
<
ProCard
bodyStyle=
{
{
padding
:
'0 12px'
}
}
>
<
JobFinishedView
/>
</
ProCard
>
<
ProCard
bodyStyle=
{
{
padding
:
'0 12px'
}
}
>
<
JobRecoveryView
/>
</
ProCard
>
</
ProCard
>
<
ProCard
title=
{
l
(
'home.job.running.status'
)
}
bodyStyle=
{
noPadding
}
>
<
JobStatusPie
/>
</
ProCard
>
</
ProCard
>
<
ProCard
split=
{
split
}
bodyStyle=
{
noPadding
}
>
<
ProCard
title=
{
l
(
'home.server.load'
)
}
bodyStyle=
{
noPadding
}
>
<
LoadScoreGauge
/>
</
ProCard
>
<
ProCard
split=
'horizontal'
bodyStyle=
{
noPadding
}
>
<
JobErrorView
/>
</
ProCard
>
</
ProCard
>
</
ProCard
>
</
RcResizeObserver
>
</
RcResizeObserver
.
Collection
>
);
return
(
<
RcResizeObserver
.
Collection
>
<
RcResizeObserver
key=
'resize-observer'
onResize=
{
(
offset
)
=>
{
setSplit
(
offset
.
width
<
596
?
'horizontal'
:
'vertical'
);
}
}
>
<
ProCard
title=
{
<>
<
Badge
status=
'processing'
/>
{
l
(
'home.job.metrics'
)
}
</>
}
headerBordered
bordered
size=
'small'
split=
{
split
}
bodyStyle=
{
noPadding
}
>
<
ProCard
split=
{
split
}
bodyStyle=
{
noPadding
}
>
<
ProCard
split=
'horizontal'
>
<
ProCard
bodyStyle=
{
{
padding
:
'0 12px'
}
}
>
<
JobRunView
/>
</
ProCard
>
<
ProCard
bodyStyle=
{
{
padding
:
'0 12px'
}
}
>
<
JobFinishedView
/>
</
ProCard
>
<
ProCard
bodyStyle=
{
{
padding
:
'0 12px'
}
}
>
<
JobRecoveryView
/>
</
ProCard
>
</
ProCard
>
<
ProCard
title=
{
l
(
'home.job.running.status'
)
}
bodyStyle=
{
noPadding
}
>
<
JobStatusPie
/>
</
ProCard
>
</
ProCard
>
<
ProCard
split=
{
split
}
bodyStyle=
{
noPadding
}
>
<
ProCard
title=
{
l
(
'home.server.load'
)
}
bodyStyle=
{
noPadding
}
>
<
LoadScoreGauge
/>
</
ProCard
>
<
ProCard
split=
'horizontal'
bodyStyle=
{
noPadding
}
>
<
JobErrorView
/>
</
ProCard
>
</
ProCard
>
</
ProCard
>
</
RcResizeObserver
>
</
RcResizeObserver
.
Collection
>
);
};
export
default
JobOverView
;
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