diff --git a/web/package.json b/web/package.json index 2985610..39a3b55 100644 --- a/web/package.json +++ b/web/package.json @@ -33,6 +33,7 @@ "codemirror": "^6.0.1", "crypto-js": "^4.2.0", "csv-parse": "^5.5.6", + "dayjs": "^1.11.13", "element-plus": "^2.7.6", "jsencrypt": "^3.3.2", "pinia": "^2.1.7", diff --git a/web/src/store/index.js b/web/src/store/index.js index 48a4722..5c08b6d 100644 --- a/web/src/store/index.js +++ b/web/src/store/index.js @@ -1,5 +1,6 @@ import { io } from 'socket.io-client' import { defineStore, acceptHMRUpdate } from 'pinia' +import dayjs from 'dayjs' import $api from '@/api' import config from '@/config' import { isHttps } from '@/utils' @@ -72,6 +73,7 @@ const useStore = defineStore({ async getHostList() { let { data: newHostList } = await $api.getHostList() newHostList = newHostList.map(newHostObj => { + newHostObj.expired = dayjs(newHostObj.expired).format('YYYY-MM-DD') const oldHostObj = this.hostList.find(({ id }) => id === newHostObj.id) return oldHostObj ? Object.assign({}, { ...oldHostObj }, { ...newHostObj }) : newHostObj }) diff --git a/web/src/views/server/components/host-table.vue b/web/src/views/server/components/host-table.vue index f4cdeaf..8740eb1 100644 --- a/web/src/views/server/components/host-table.vue +++ b/web/src/views/server/components/host-table.vue @@ -36,9 +36,15 @@ {{ row.monitorData?.ipInfo.country || '--' }} {{ row.monitorData?.ipInfo.regionName }} - + + {{ row.expired }} + + 服务商控制台 + + {{ row.clientPort }} +
客户端监控服务未安装或连接失败,无法获取实例监控数据。去安装 @@ -79,18 +85,48 @@ - + @@ -100,6 +136,8 @@