From cca9973b280e086f0befb638acaffd2ad00d9196 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Sat, 11 Nov 2023 16:27:19 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E7=BC=93=E5=AD=98=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/locales/en-US.ts | 36 ++++++++++++++ src/i18n/locales/zh-CN.ts | 36 ++++++++++++++ src/views/monitor/cache/index.vue | 83 +++++++++++++++++-------------- src/views/monitor/cache/info.vue | 38 ++++++++------ 4 files changed, 141 insertions(+), 52 deletions(-) diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index e8afdcdd..aa745d73 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -866,6 +866,42 @@ export default { jobMsg: "Job Messages", targetParams: "TargetParams", }, + cache: { + cacheKey: "Cache Key Name", + cacheName: "Cache Name", + cacheValue: "Cached content", + remark: "Remark", + clearCacheKeyOk: "Deleted cache key name {txt}", + clearCacheNameOk: "Cleared cache name {txt}", + cacheList: "Cache Lists", + cacheKeyListErr: "Please select the data item in the cache list!", + clearCacheSafe: "Security Clearance", + clearCacheSafeTip: "Confirm that you want to perform a safe clean of all key names under the cache?", + clearCacheSafeOk: "Completed securely clearing the cache", + filter: "Filter", + filterPlace: "Fuzzy filtering {txt}", + clearCacheNameTip: "Are you sure you want to clear all the keys under that cache name?", + keyNameList: "Key Name List", + clearCacheKeyTip: "Are you sure you want to delete the cache key?", + keyContent: "Cached content", + }, + cacheInfo: { + version: "Service Versions", + mode: "Perating Mode", + modeStandalone: "stand-alone", + modeClusters: "clusters", + port: "Port", + clients: "Client Connections", + uptimeInDays: "Running time (days)", + memoryHuman: "Using Memory", + usedCpu: "Using CPU", + maxmemory: "Memory Configuration", + aof: "Whether AOF is enabled", + rdb: "Whether the RDB is successful", + dbSize: "Number of Keys", + kbps: "Network entry/exit", + commandstats: "Command Statistics", + }, }, system:{ user: { diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index cbba3925..bf44e90a 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -866,6 +866,42 @@ export default { jobMsg: "日志信息", targetParams: "传入参数", }, + cache: { + cacheKey: "缓存键名", + cacheName: "缓存名称", + cacheValue: "缓存内容", + remark: "备注", + clearCacheKeyOk: "已删除缓存键名 {txt}", + clearCacheNameOk: "已清理缓存名称 {txt}", + cacheList: "缓存列表", + cacheKeyListErr: "请在缓存列表中选择数据项!", + clearCacheSafe: "安全清理", + clearCacheSafeTip: "确认要执行可安全清理的缓存下所有键名吗?", + clearCacheSafeOk: "已完成安全清理缓存", + filter: "过滤", + filterPlace: "模糊过滤 {txt}", + clearCacheNameTip: "确认要清理该缓存名称下的所有键名吗?", + keyNameList: "键名列表", + clearCacheKeyTip: "确认要删除该缓存键吗?", + keyContent: "缓存内容", + }, + cacheInfo: { + version: "服务版本", + mode: "运行模式", + modeStandalone: "单机", + modeClusters: "集群", + port: "端口", + clients: "已删除缓存键名 {txt}", + uptimeInDays: "运行时间(天)", + memoryHuman: "使用内存", + usedCpu: "使用CPU", + maxmemory: "内存配置", + aof: "AOF是否开启", + rdb: "RDB是否成功", + dbSize: "Key数量", + kbps: "网络入口/出口", + commandstats: "命令统计", + }, }, system:{ user:{ diff --git a/src/views/monitor/cache/index.vue b/src/views/monitor/cache/index.vue index dc880b55..6ead5fb1 100644 --- a/src/views/monitor/cache/index.vue +++ b/src/views/monitor/cache/index.vue @@ -50,7 +50,7 @@ function fnCacheKeyInfo(cacheKey: string) { /**键名列表表格字段列 */ let cacheKeyTableColumns: ColumnsType = [ { - title: '序号', + title: t('common.rowId'), dataIndex: 'num', width: '50px', align: 'center', @@ -59,7 +59,7 @@ let cacheKeyTableColumns: ColumnsType = [ }, }, { - title: '缓存键名', + title: t('views.monitor.cache.cacheKey'), dataIndex: 'cacheKey', align: 'left', ellipsis: true, @@ -77,7 +77,7 @@ let cacheKeyTableColumns: ColumnsType = [ }, }, { - title: '操作', + title: t('common.operate'), key: 'option', align: 'center', width: '50px', @@ -105,7 +105,7 @@ function fnCacheKeyClear(cacheKey: string) { isClick.value = false; if (res.code === RESULT_CODE_SUCCESS) { message.success({ - content: `已删除缓存键名 ${cacheKey}`, + content: t('views.monitor.cache.clearCacheKeyOk', { txt: cacheKey }), duration: 3, }); // 缓存内容显示且是删除的缓存键名,需要进行加载显示 @@ -128,7 +128,7 @@ function fnCacheKeyList(cacheName: string = 'load') { cacheName = cacheKeyTable.cacheName; } if (!cacheName) { - message.warning('请在缓存列表中选择数据项!', 3); + message.warning(t('views.monitor.cache.cacheKeyListErr'), 3); return; } if (isClick.value) return; @@ -153,7 +153,7 @@ let cacheNameTable = reactive({ /**缓存列表表格字段列 */ let cacheNameTableColumns: ColumnsType = [ { - title: '序号', + title: t('common.rowId'), dataIndex: 'num', width: '50px', align: 'center', @@ -162,7 +162,7 @@ let cacheNameTableColumns: ColumnsType = [ }, }, { - title: '缓存名称', + title: t('views.monitor.cache.cacheName'), dataIndex: 'cacheName', align: 'left', ellipsis: true, @@ -180,13 +180,13 @@ let cacheNameTableColumns: ColumnsType = [ }, }, { - title: '备注', + title: t('views.monitor.cache.remark'), dataIndex: 'remark', align: 'left', ellipsis: true, }, { - title: '操作', + title: t('common.operate'), key: 'option', align: 'center', width: '50px', @@ -203,7 +203,7 @@ function fnClearCacheSafe() { isClick.value = false; if (res.code === RESULT_CODE_SUCCESS) { message.success({ - content: '已完成安全清理缓存', + content: t('views.monitor.cache.clearCacheSafeOk'), duration: 3, }); cacheKeyTable.loading = true; @@ -230,7 +230,7 @@ function fnCacheNameClear(cacheName: string) { isClick.value = false; if (res.code === RESULT_CODE_SUCCESS) { message.success({ - content: `已清理缓存名称 ${cacheName}`, + content: t('views.monitor.cache.clearCacheNameOk', { txt: cacheName }), duration: 3, }); // 缓存内容显示且是删除的缓存名称,需要进行加载显示 @@ -271,25 +271,29 @@ onMounted(() => { @@ -352,9 +358,10 @@ onMounted(() => {