feature(web): 移除 web 页面到本地路径
This commit is contained in:
79
web/components/queue-tab.js
Normal file
79
web/components/queue-tab.js
Normal file
@@ -0,0 +1,79 @@
|
||||
function queueCrud(name) {
|
||||
return {
|
||||
type: 'crud',
|
||||
title: name,
|
||||
api: `\${base}/queue/all?name=${name}`,
|
||||
interval: 10000,
|
||||
syncLocation: false,
|
||||
silentPolling: true,
|
||||
loadDataOnce: true,
|
||||
affixHeader: false,
|
||||
perPage: 5,
|
||||
stopAutoRefreshWhenModalIsOpen: true,
|
||||
resizable: false,
|
||||
headerToolbar: [
|
||||
"reload",
|
||||
'filter-toggler',
|
||||
{
|
||||
type: "tpl",
|
||||
tpl: "共 <span class='text-primary font-bold'>${total|default:0}</span> 个任务"
|
||||
},
|
||||
{
|
||||
type: 'pagination',
|
||||
layout: ['pager'],
|
||||
maxButtons: 8,
|
||||
showPageInput: false,
|
||||
}
|
||||
],
|
||||
footerToolbar: [],
|
||||
columns: [
|
||||
{
|
||||
name: 'data.flinkJobId',
|
||||
label: '任务 ID',
|
||||
width: 170,
|
||||
...copyField('data.flinkJobId')
|
||||
},
|
||||
{
|
||||
name: 'data.alias',
|
||||
label: '别名',
|
||||
...copyField('data.alias')
|
||||
},
|
||||
{
|
||||
name: 'data.batch',
|
||||
label: '批次',
|
||||
width: 100,
|
||||
type: 'tpl',
|
||||
tpl: '<span class="label label-warning">${data.batch}</span>'
|
||||
},
|
||||
{
|
||||
name: 'priority',
|
||||
label: '优先级',
|
||||
width: 60,
|
||||
type: 'tpl',
|
||||
tpl: '<span class="label bg-info">${priority}</span>'
|
||||
},
|
||||
{
|
||||
name: 'data.comment',
|
||||
label: '备注',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
name: 'createTime',
|
||||
label: '任务提交时间',
|
||||
...time('createTime'),
|
||||
width: 140,
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
function queueTab() {
|
||||
return {
|
||||
title: '压缩队列',
|
||||
tab: [
|
||||
queueCrud('compaction-queue-pre'),
|
||||
queueCrud('compaction-queue-b1'),
|
||||
queueCrud('compaction-queue-b5'),
|
||||
],
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user