Files
hudi-service/web/components/running-tab.js
lanyuanxiaoyao 7768b427aa feature(web): 优化 web 界面显示
时间字段展示、集群展示等
2024-03-05 15:16:47 +08:00

55 lines
1.4 KiB
JavaScript

function runningTable(name) {
return {
type: 'table',
title: `${name}`,
itemAction: {
type: 'button',
actionType: 'dialog',
dialog: {
title: 'Path',
body: '${path}',
actions: [],
}
},
columns: [
{name: 'label', label: '名称'},
{
name: 'createTime',
label: '创建时间',
...timeAndFrom('createTime', 'createTimeFromNow', undefined, false),
width: 70,
},
]
}
}
function runningTab() {
return {
title: '运行中',
tab: [
{
type: 'grid',
columns: [
{
body: [
{
type: 'service',
api: '${base}/running/sync',
body: runningTable('同步')
}
]
},
{
body: [
{
type: 'service',
api: '${base}/running/compaction',
body: runningTable('压缩')
}
]
}
]
}
],
}
}