refactor(web): 调整部分图表的显示
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
function time(field) {
|
function time(field) {
|
||||||
return {
|
return {
|
||||||
type: 'tpl',
|
type: 'tpl',
|
||||||
tpl: `\${${field}|date:YYYY-MM-DD HH\\:mm\\:ss:x}`
|
tpl: `\${IF(${field}, DATETOSTR(${field}, 'YYYY-MM-DD HH:mm:ss'), undefined)}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -32,27 +32,6 @@ function cloudCrud(title, path) {
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
width: 140,
|
width: 140,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'registrationTime',
|
|
||||||
label: '注册时间',
|
|
||||||
...time('registrationTime'),
|
|
||||||
align: 'center',
|
|
||||||
width: 140,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'lastRenewalTime',
|
|
||||||
label: '上次更新时间',
|
|
||||||
...time('lastRenewalTime'),
|
|
||||||
align: 'center',
|
|
||||||
width: 140,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'evictionTime',
|
|
||||||
label: '驱逐时间',
|
|
||||||
...time('evictionTime'),
|
|
||||||
align: 'center',
|
|
||||||
width: 140,
|
|
||||||
},
|
|
||||||
{name: 'url', label: '地址', width: 200},
|
{name: 'url', label: '地址', width: 200},
|
||||||
{name: 'serviceId', label: '服务', width: 180, fixed: 'right'},
|
{name: 'serviceId', label: '服务', width: 180, fixed: 'right'},
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1118,6 +1118,11 @@ let hudiTimelineTypeMapping = [
|
|||||||
mappingItem('归档', 'archive', 'bg-gray-300'),
|
mappingItem('归档', 'archive', 'bg-gray-300'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
let tableRunningStateMapping = [
|
||||||
|
mappingItem('运行中', 'true', 'label-success'),
|
||||||
|
mappingItem('未运行', 'false'),
|
||||||
|
]
|
||||||
|
|
||||||
function mappingField(field, mapping) {
|
function mappingField(field, mapping) {
|
||||||
let mapData = {
|
let mapData = {
|
||||||
'*': `<span class='label bg-gray-300'>\${${field}}</span>`,
|
'*': `<span class='label bg-gray-300'>\${${field}}</span>`,
|
||||||
|
|||||||
@@ -78,7 +78,8 @@ function queueTab() {
|
|||||||
return {
|
return {
|
||||||
title: '压缩队列',
|
title: '压缩队列',
|
||||||
tab: [
|
tab: [
|
||||||
queueCrud('compaction-queue-b1')
|
queueCrud('compaction-queue-b1'),
|
||||||
|
queueCrud('compaction-queue-b5'),
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -150,6 +150,13 @@ function tableTab() {
|
|||||||
...mappingField('flinkJob.runMode', runModeMapping),
|
...mappingField('flinkJob.runMode', runModeMapping),
|
||||||
filterable: filterableField(runModeMapping, true)
|
filterable: filterableField(runModeMapping, true)
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'syncRunning',
|
||||||
|
label: '同步运行状态',
|
||||||
|
align: 'center',
|
||||||
|
...mappingField('syncRunning', tableRunningStateMapping),
|
||||||
|
className: 'bg-green-50',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'source_start_time',
|
name: 'source_start_time',
|
||||||
label: '同步启动时间',
|
label: '同步启动时间',
|
||||||
@@ -190,6 +197,13 @@ function tableTab() {
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
className: 'bg-green-50',
|
className: 'bg-green-50',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'compactionRunning',
|
||||||
|
label: '压缩运行状态',
|
||||||
|
align: 'center',
|
||||||
|
...mappingField('compactionRunning', tableRunningStateMapping),
|
||||||
|
className: 'bg-cyan-50',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'compaction_status',
|
name: 'compaction_status',
|
||||||
label: '压缩状态',
|
label: '压缩状态',
|
||||||
|
|||||||
@@ -52,12 +52,12 @@
|
|||||||
unmountOnExit: true,
|
unmountOnExit: true,
|
||||||
tabsMode: 'strong',
|
tabsMode: 'strong',
|
||||||
tabs: [
|
tabs: [
|
||||||
queueTab(),
|
|
||||||
tableTab(),
|
tableTab(),
|
||||||
|
queueTab(),
|
||||||
yarnTab('b5-sync', '同步 b5', undefined, 'Sync'),
|
yarnTab('b5-sync', '同步 b5', undefined, 'Sync'),
|
||||||
yarnTab('b1', '压缩 b1', 'datalake,tyly', 'Compaction'),
|
yarnTab('b1', '压缩 b1', 'datalake,tyly', 'Compaction'),
|
||||||
yarnTab('b1,b5', '压缩 b1 b5', 'datalake,tyly', 'Compaction'),
|
|
||||||
// yarnTab('b4', '压缩 b4'),
|
// yarnTab('b4', '压缩 b4'),
|
||||||
|
yarnTab('b1,b5', '压缩 b1 b5', 'datalake,tyly', 'Compaction'),
|
||||||
yarnTab('b5', '压缩 b5'),
|
yarnTab('b5', '压缩 b5'),
|
||||||
cloudTab(),
|
cloudTab(),
|
||||||
]
|
]
|
||||||
@@ -68,8 +68,8 @@
|
|||||||
amisJSON,
|
amisJSON,
|
||||||
{
|
{
|
||||||
data: {
|
data: {
|
||||||
// base: 'http://132.122.116.142:38000',
|
base: 'http://132.122.116.148:35690/hudi_services/service_web',
|
||||||
base: '/hudi_services/service_web',
|
// base: '/hudi_services/service_web',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user