feat(web): overview增加同步任务状态展示
This commit is contained in:
@@ -94,6 +94,123 @@ function versionDetailDialog(variable, target) {
|
||||
}
|
||||
}
|
||||
|
||||
function jobDetailDialog(variable, targetList) {
|
||||
return {
|
||||
disabledOn: `${variable} === 0`,
|
||||
type: 'action',
|
||||
label: '详情',
|
||||
level: 'link',
|
||||
size: 'sm',
|
||||
actionType: 'dialog',
|
||||
dialog: {
|
||||
title: '详情',
|
||||
size: 'sm',
|
||||
...readOnlyDialogOptions(),
|
||||
body: [
|
||||
{
|
||||
type: "table",
|
||||
source: `\${${targetList}}`,
|
||||
affixHeader: false,
|
||||
columns: [
|
||||
{
|
||||
label: 'Flink job id',
|
||||
fixed: 'left',
|
||||
type: 'wrapper',
|
||||
size: 'none',
|
||||
body: [
|
||||
{
|
||||
type: 'tpl',
|
||||
tpl: '${id}',
|
||||
},
|
||||
{
|
||||
type: 'action',
|
||||
level: 'link',
|
||||
label: '',
|
||||
icon: 'fa fa-copy',
|
||||
size: 'xs',
|
||||
actionType: 'copy',
|
||||
content: '${id}',
|
||||
tooltip: '复制 ID',
|
||||
}
|
||||
],
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function tableDetailDialog(variable, targetList) {
|
||||
return {
|
||||
disabledOn: `${variable} === 0`,
|
||||
type: 'action',
|
||||
label: '详情',
|
||||
level: 'link',
|
||||
size: 'sm',
|
||||
actionType: 'dialog',
|
||||
dialog: {
|
||||
title: '详情',
|
||||
size: 'md',
|
||||
...readOnlyDialogOptions(),
|
||||
body: [
|
||||
{
|
||||
type: "table",
|
||||
source: `\${${targetList}}`,
|
||||
affixHeader: false,
|
||||
columns: [
|
||||
{
|
||||
label: 'Flink job id',
|
||||
fixed: 'left',
|
||||
type: 'wrapper',
|
||||
size: 'none',
|
||||
body: [
|
||||
{
|
||||
type: 'tpl',
|
||||
tpl: '${id}',
|
||||
},
|
||||
{
|
||||
type: 'action',
|
||||
level: 'link',
|
||||
label: '',
|
||||
icon: 'fa fa-copy',
|
||||
size: 'xs',
|
||||
actionType: 'copy',
|
||||
content: '${id}',
|
||||
tooltip: '复制 ID',
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
label: '别名',
|
||||
type: 'wrapper',
|
||||
fixed: 'left',
|
||||
size: 'none',
|
||||
className: 'nowrap',
|
||||
body: [
|
||||
{
|
||||
type: 'tpl',
|
||||
tpl: '${alias}',
|
||||
},
|
||||
{
|
||||
type: 'action',
|
||||
level: 'link',
|
||||
label: '',
|
||||
icon: 'fa fa-copy',
|
||||
size: 'xs',
|
||||
actionType: 'copy',
|
||||
content: '${alias}',
|
||||
tooltip: '复制别名',
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function overviewYarnJob(cluster, search, queue, yarnQueue) {
|
||||
return {
|
||||
className: 'font-mono',
|
||||
@@ -220,6 +337,42 @@ function overviewTab() {
|
||||
]
|
||||
},
|
||||
{type: 'divider'},
|
||||
{
|
||||
type: 'service',
|
||||
api: '${base}/overview/sync_running_status',
|
||||
body: [
|
||||
{
|
||||
type: 'tpl',
|
||||
tpl: '任务数<span class="font-bold m-2 font-mono">${totalJob}</span>'
|
||||
},
|
||||
{
|
||||
className: 'mx-2',
|
||||
type: 'tpl',
|
||||
tpl: '运行中<span class="font-bold m-2 font-mono">${PADSTART(runningJob, 3)}</span>'
|
||||
},
|
||||
{
|
||||
type: 'tpl',
|
||||
tpl: '已停止<span class="font-bold m-2 font-mono text-danger">${PADSTART(unRunningJob, 3)}</span>'
|
||||
},
|
||||
jobDetailDialog('unRunningJob', 'unRunningJobList'),
|
||||
'<br/>',
|
||||
{
|
||||
type: 'tpl',
|
||||
tpl: '总表数<span class="font-bold m-2 font-mono">${totalTable}</span>'
|
||||
},
|
||||
{
|
||||
className: 'mx-2',
|
||||
type: 'tpl',
|
||||
tpl: '运行中<span class="font-bold m-2 font-mono">${PADSTART(runningTable, 3)}</span>'
|
||||
},
|
||||
{
|
||||
type: 'tpl',
|
||||
tpl: '已停止<span class="font-bold m-2 font-mono text-danger">${PADSTART(unRunningTable, 3)}</span>'
|
||||
},
|
||||
tableDetailDialog('unRunningTable', 'unRunningTableList'),
|
||||
]
|
||||
},
|
||||
{type: 'divider'},
|
||||
'<span class="italic text-gray-500 my-2">集群 (集群总资源使用,队列资源使用)(调度中任务数,运行中任务数)</span>',
|
||||
overviewYarnJob('b12', 'Sync', undefined, 'default'),
|
||||
{type: 'divider'},
|
||||
|
||||
Reference in New Issue
Block a user