From e9a567c3fe3f5ba9d924b8ea82553b5c737926d9 Mon Sep 17 00:00:00 2001 From: chaos-zhu Date: Sun, 20 Oct 2024 21:56:41 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E4=BC=98=E5=8C=96=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E7=AB=AF=E5=85=BC=E5=AE=B9UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/package.json | 1 + web/src/store/index.js | 2 + .../views/server/components/host-table.vue | 63 +++++++++++++++---- yarn.lock | 5 ++ 4 files changed, 59 insertions(+), 12 deletions(-) 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 @@