From 71ab5f512dff1263d9de39c88cbd9023093134fb Mon Sep 17 00:00:00 2001 From: aaron <> Date: Mon, 10 Mar 2025 20:19:04 +0800 Subject: [PATCH] update --- src/components/SystemHealth.vue | 465 ++++++++++++++++++++++++++++++++ src/router/index.js | 10 + 2 files changed, 475 insertions(+) create mode 100644 src/components/SystemHealth.vue diff --git a/src/components/SystemHealth.vue b/src/components/SystemHealth.vue new file mode 100644 index 0000000..8734fca --- /dev/null +++ b/src/components/SystemHealth.vue @@ -0,0 +1,465 @@ + + + + 系统健康状态 + + + + {{ isLoading ? '加载中...' : '刷新数据' }} + + + + + 包含慢查询 + + + + 包含长会话 + + + + + + {{ errorMessage }} + + + + + 加载系统健康数据... + + + + + + + 数据库连接池 + + + 池大小 + {{ healthData.connection_pool.pool_size }} + + + 已签入 + {{ healthData.connection_pool.checkedin }} + + + 已签出 + {{ healthData.connection_pool.checkedout }} + + + 溢出 + + {{ healthData.connection_pool.overflow }} + + + + + + + + 会话信息 + + + 活跃会话 + {{ healthData.sessions.active_count }} + + + 长时间运行会话 + + {{ healthData.sessions.long_running_count }} + + + + 慢查询数量 + + {{ healthData.performance_stats.slow_queries_count }} + + + + + + + + + 性能统计 + + + + 最慢端点 + + + + + 端点 + 响应时间 (秒) + + + + + {{ endpoint[0] }} + {{ endpoint[1].toFixed(4) }} + + + 无数据 + + + + + + + + + 每小时请求数 + + + + + 时间 + 请求数 + + + + + {{ hour }} + {{ count }} + + + 无数据 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 4192c2e..b0d03f2 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -7,6 +7,7 @@ import HowToUse from '../components/HowToUse.vue' import CommunityRequest from '../components/CommunityRequest.vue' import PartnerRequest from '../components/PartnerRequest.vue' import ImageRecognition from '../components/ImageRecognition.vue' +import SystemHealth from '../components/SystemHealth.vue' const routes = [ { @@ -69,6 +70,15 @@ const routes = [ meta: { title: '蜂快AI·快递取件码识别' } + }, + { + path: '/system-health', + name: 'SystemHealth', + component: SystemHealth, + meta: { + title: '系统健康状态', + requiresAuth: true + } } ]