From cef8b4a5a1ac40620f05df1941583c1e30218bd3 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 16:22:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/monitor/cache.ts | 25 +++---------------------- src/views/monitor/caches/index.vue | 8 ++++++-- src/views/monitor/server/index.vue | 1 - 3 files changed, 9 insertions(+), 25 deletions(-) diff --git a/src/api/monitor/cache.ts b/src/api/monitor/cache.ts index e061681..f18e77e 100644 --- a/src/api/monitor/cache.ts +++ b/src/api/monitor/cache.ts @@ -1,31 +1,12 @@ import { http } from '@/utils/http/axios'; /** - * @description: 缓存名称列表 + * @description: 缓存监控信息 */ -export function getCacheNames(params?) { +export function getCacheInfo(params?) { return http.request({ - url: '/cache/getNames', + url: '/cache/info', 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/views/monitor/caches/index.vue b/src/views/monitor/caches/index.vue index 2d73941..17052a5 100644 --- a/src/views/monitor/caches/index.vue +++ b/src/views/monitor/caches/index.vue @@ -30,7 +30,7 @@ @@ -124,10 +124,14 @@ const handleDelete = async(row,type)=> { await confirm('确定要删除?'); if(type=='cacheName') { await deleteCacheName(row.cacheName) + message("删除成功"); + loadCacheNames() }else { await deleteCacheKey(row.cacheKey) - } message("删除成功"); + loadCachekeys() + } + } const clearAll = async()=> { await confirm('确定要清理全部?'); diff --git a/src/views/monitor/server/index.vue b/src/views/monitor/server/index.vue index 0b77cbc..3964a9b 100644 --- a/src/views/monitor/server/index.vue +++ b/src/views/monitor/server/index.vue @@ -76,7 +76,6 @@