feature(web): 优化 web 界面显示

时间字段展示、集群展示等
This commit is contained in:
2023-06-01 14:02:18 +08:00
parent 001e8d3e5f
commit 7768b427aa
5 changed files with 51 additions and 50 deletions

View File

@@ -75,7 +75,7 @@ function tableTab() {
{
type: 'pagination',
layout: ['pager', 'perPage'],
maxButtons: 8,
maxButtons: 5,
showPageInput: false,
},
],
@@ -83,7 +83,7 @@ function tableTab() {
{
type: 'pagination',
layout: ['pager', 'perPage'],
maxButtons: 8,
maxButtons: 5,
showPageInput: false,
},
],
@@ -120,6 +120,7 @@ function tableTab() {
type: 'wrapper',
fixed: 'left',
size: 'none',
className: 'nowrap',
body: [
{
type: 'action',
@@ -156,46 +157,34 @@ function tableTab() {
align: 'center',
...mappingField('syncRunning', tableRunningStateMapping),
className: 'bg-green-50',
width: 140,
width: 75,
},
{
name: 'source_start_time',
label: '同步启动时间',
width: 140,
type: 'tpl',
tpl: timeAndFrom('syncState.sourceStartTime', 'syncState.sourceStartTimeFromNow', '未启动'),
...timeAndFrom('syncState.sourceStartTime', 'syncState.sourceStartTimeFromNow', '未启动'),
sortable: true,
align: 'center',
className: 'bg-green-50',
},
{
name: 'source_checkpoint_time',
label: '同步心跳时间',
width: 140,
type: 'tpl',
tpl: timeAndFrom('syncState.sourceCheckpointTime', 'syncState.sourceCheckpointTimeFromNow', '未启动'),
...timeAndFrom('syncState.sourceCheckpointTime', 'syncState.sourceCheckpointTimeFromNow', '未启动'),
sortable: true,
align: 'center',
className: 'bg-green-50',
},
{
name: 'source_publish_time',
label: '源端发布时间',
width: 140,
type: 'tpl',
tpl: timeAndFrom('syncState.sourcePublishTime', 'syncState.sourcePublishTimeFromNow', '无增量'),
...timeAndFrom('syncState.sourcePublishTime', 'syncState.sourcePublishTimeFromNow', '无增量'),
sortable: true,
align: 'center',
className: 'bg-green-50',
},
{
name: 'source_operation_time',
label: '源端业务时间',
width: 140,
type: 'tpl',
tpl: timeAndFrom('syncState.sourceOperationTime', 'syncState.sourceOperationTimeFromNow', '无增量'),
...timeAndFrom('syncState.sourceOperationTime', 'syncState.sourceOperationTimeFromNow', '无增量'),
sortable: true,
align: 'center',
className: 'bg-green-50',
},
{
@@ -204,7 +193,7 @@ function tableTab() {
align: 'center',
...mappingField('compactionRunning', tableRunningStateMapping),
className: 'bg-cyan-50',
width: 140,
width: 75,
},
{
name: 'compaction_status',
@@ -226,21 +215,15 @@ function tableTab() {
{
name: 'compaction_start_time',
label: '压缩启动时间',
width: 140,
type: 'tpl',
tpl: timeAndFrom('syncState.compactionStartTime', 'syncState.compactionStartTimeFromNow'),
...timeAndFrom('syncState.compactionStartTime', 'syncState.compactionStartTimeFromNow'),
sortable: true,
align: 'center',
className: 'bg-cyan-50',
},
{
name: 'compaction_finish_time',
label: '压缩完成时间',
width: 140,
type: 'tpl',
tpl: timeAndFrom('syncState.compactionFinishTime', 'syncState.compactionFinishTimeFromNow'),
...timeAndFrom('syncState.compactionFinishTime', 'syncState.compactionFinishTimeFromNow'),
sortable: true,
align: 'center',
className: 'bg-cyan-50',
},
]