feat
This commit is contained in:
@@ -34,7 +34,7 @@ export const columns = [
|
|||||||
{
|
{
|
||||||
dataIndex: 'agent_config',
|
dataIndex: 'agent_config',
|
||||||
title: 'Agent配置',
|
title: 'Agent配置',
|
||||||
width: 100,
|
width: 120,
|
||||||
slotName: 'agent_config',
|
slotName: 'agent_config',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -64,6 +64,7 @@ export const columns = [
|
|||||||
dataIndex: 'last_check_time',
|
dataIndex: 'last_check_time',
|
||||||
title: '最后检查时间',
|
title: '最后检查时间',
|
||||||
width: 180,
|
width: 180,
|
||||||
|
slotName: 'last_check_time',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'actions',
|
dataIndex: 'actions',
|
||||||
|
|||||||
@@ -56,6 +56,11 @@
|
|||||||
{{ formatUptime(record.uptime) }}
|
{{ formatUptime(record.uptime) }}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<!-- 最后检查时间 -->
|
||||||
|
<template #last_check_time="{ record }">
|
||||||
|
{{ formatTime(record.last_check_time) }}
|
||||||
|
</template>
|
||||||
|
|
||||||
<!-- 状态 -->
|
<!-- 状态 -->
|
||||||
<template #status="{ record }">
|
<template #status="{ record }">
|
||||||
<a-tag :color="getStatusColor(record.status)">
|
<a-tag :color="getStatusColor(record.status)">
|
||||||
@@ -233,6 +238,19 @@ const formatUptime = (uptime?: number) => {
|
|||||||
return `${minutes}分钟`
|
return `${minutes}分钟`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 格式化时间
|
||||||
|
const formatTime = (time?: string) => {
|
||||||
|
if (!time) return '-'
|
||||||
|
const date = new Date(time)
|
||||||
|
const year = date.getFullYear()
|
||||||
|
const month = String(date.getMonth() + 1).padStart(2, '0')
|
||||||
|
const day = String(date.getDate()).padStart(2, '0')
|
||||||
|
const hours = String(date.getHours()).padStart(2, '0')
|
||||||
|
const minutes = String(date.getMinutes()).padStart(2, '0')
|
||||||
|
const seconds = String(date.getSeconds()).padStart(2, '0')
|
||||||
|
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
|
||||||
|
}
|
||||||
|
|
||||||
// 获取中间件列表
|
// 获取中间件列表
|
||||||
const fetchMiddlewareData = async () => {
|
const fetchMiddlewareData = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
|
|||||||
Reference in New Issue
Block a user