mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-15 03:25:06 +08:00
fix(Redis监控): fix review
This commit is contained in:
@ -17,9 +17,9 @@ export function getKeyList() {
|
||||
}
|
||||
|
||||
// 获取键名列表
|
||||
export function getKeyDefineKeys(keyDefine) {
|
||||
export function getKeyDefines(keyDefine) {
|
||||
return request({
|
||||
url: '/infra/redis/get-key/' + keyDefine,
|
||||
url: '/infra/redis/get-key-Defines?keyDefine=' + keyDefine,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@ -27,15 +27,15 @@ export function getKeyDefineKeys(keyDefine) {
|
||||
// 获取缓存内容
|
||||
export function getKeyValue(keyDefine, key) {
|
||||
return request({
|
||||
url: '/infra/redis/get-key/' + keyDefine + "/" + key,
|
||||
url: '/infra/redis/get-key-value?keyDefine=' + keyDefine + "&cacheKey=" + key,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 根据键名删除缓存
|
||||
export function clearCacheKey(key) {
|
||||
export function deleteKeyValue(key) {
|
||||
return request({
|
||||
url: '/infra/redis/clear-key/' + key,
|
||||
url: '/infra/redis/delete-key-value?cacheKey=' + key,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
@ -188,7 +188,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCache, getKeyList, getKeyDefineKeys, getKeyValue, clearCacheKey } from "@/api/infra/redis";
|
||||
import { getCache, getKeyList, getKeyDefines, getKeyValue, deleteKeyValue } from "@/api/infra/redis";
|
||||
import echarts from "echarts";
|
||||
|
||||
export default {
|
||||
@ -303,7 +303,7 @@ export default {
|
||||
// 获取键名列表
|
||||
handleCacheKeys (keyDefine){
|
||||
const cacheName = keyDefine !== undefined ? keyDefine : this.keyTemplate;
|
||||
getKeyDefineKeys(cacheName).then(response => {
|
||||
getKeyDefines(cacheName).then(response => {
|
||||
this.cachekeys = response.data
|
||||
this.cacheForm = {}
|
||||
})
|
||||
@ -324,7 +324,7 @@ export default {
|
||||
|
||||
// 删除缓存
|
||||
handleClearCacheKey(key){
|
||||
clearCacheKey(key).then(response =>{
|
||||
deleteKeyValue(key).then(response =>{
|
||||
this.$modal.msgSuccess("清理缓存键名[" + key + "]成功");
|
||||
this.handleCacheKeys();
|
||||
})
|
||||
|
Reference in New Issue
Block a user