From 4d8ede82b7f5864321828dae0eba1db6e8d531cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E7=BA=A2=E4=B8=BD?= <1181930680@qq.com> Date: Mon, 5 Aug 2024 11:12:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E7=9B=91=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/monitor/caches.ts | 31 ++++++ src/api/monitor/server.ts | 11 +++ src/utils/lib/echarts.ts | 2 + src/views/monitor/caches/index.vue | 6 +- src/views/monitor/server/index.vue | 146 +++++++++++++++++++++++++++++ 5 files changed, 193 insertions(+), 3 deletions(-) create mode 100644 src/api/monitor/caches.ts create mode 100644 src/api/monitor/server.ts create mode 100644 src/views/monitor/server/index.vue diff --git a/src/api/monitor/caches.ts b/src/api/monitor/caches.ts new file mode 100644 index 0000000..e061681 --- /dev/null +++ b/src/api/monitor/caches.ts @@ -0,0 +1,31 @@ +import { http } from '@/utils/http/axios'; + +/** + * @description: 缓存名称列表 + */ +export function getCacheNames(params?) { + return http.request({ + url: '/cache/getNames', + method: 'GET', + params, + }); +} +/** + * @description: 缓存key列表 + */ +export function getCacheKeys(cacheName) { + return http.request({ + url: '/cache/getKeys/'+cacheName, + method: 'get', + }); +} +/** + * @description: 缓存value列表 + */ +export function getCacheValue(params?) { + return http.request({ + url: '/cache/getValue', + method: 'get', + params + }); +} \ No newline at end of file diff --git a/src/api/monitor/server.ts b/src/api/monitor/server.ts new file mode 100644 index 0000000..3116353 --- /dev/null +++ b/src/api/monitor/server.ts @@ -0,0 +1,11 @@ +import { http } from '@/utils/http/axios'; + +/** + * @description: 获取服务监控信息 + */ +export function getServerInfo() { + return http.request({ + url: '/server/info', + method: 'GET' + }); +} \ No newline at end of file diff --git a/src/utils/lib/echarts.ts b/src/utils/lib/echarts.ts index a52f48b..6f7bfd8 100644 --- a/src/utils/lib/echarts.ts +++ b/src/utils/lib/echarts.ts @@ -7,6 +7,7 @@ import { MapChart, PictorialBarChart, RadarChart, + GaugeChart, } from 'echarts/charts'; import { @@ -40,6 +41,7 @@ echarts.use([ PieChart, MapChart, RadarChart, + GaugeChart, SVGRenderer, PictorialBarChart, RadarComponent, diff --git a/src/views/monitor/caches/index.vue b/src/views/monitor/caches/index.vue index f5968ca..7ccd80b 100644 --- a/src/views/monitor/caches/index.vue +++ b/src/views/monitor/caches/index.vue @@ -10,7 +10,7 @@ @@ -22,7 +22,7 @@ @@ -47,7 +47,7 @@ + \ No newline at end of file