feature(web): 优化 cloud 服务相关信息获取
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
function time(field) {
|
||||
return {
|
||||
type: 'tpl',
|
||||
tpl: `\${${field}|date:YYYY-MM-DD HH\\:mm\\:ss:x}`
|
||||
}
|
||||
}
|
||||
|
||||
function cloudCrud(title, path) {
|
||||
return {
|
||||
type: 'crud',
|
||||
@@ -13,11 +20,41 @@ function cloudCrud(title, path) {
|
||||
columns: [
|
||||
{name: 'name', label: '名称'},
|
||||
{
|
||||
name: 'serviceId',
|
||||
label: '服务',
|
||||
width: 200,
|
||||
name: 'status',
|
||||
label: '状态',
|
||||
align: 'center',
|
||||
width: 60,
|
||||
},
|
||||
{
|
||||
name: 'serviceUpTime',
|
||||
label: '启动时间',
|
||||
...time('serviceUpTime'),
|
||||
align: 'center',
|
||||
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: 'serviceId', label: '服务', width: 180, fixed: 'right'},
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user