mirror of
https://github.com/pure-admin/pure-admin-thin.git
synced 2025-04-25 07:57:18 +08:00
fix: 优化缓存监控页面的编写
This commit is contained in:
parent
aa37f8c7af
commit
5aa607744b
16
src/views/monitor/cache/index.vue
vendored
16
src/views/monitor/cache/index.vue
vendored
@ -21,13 +21,13 @@
|
|||||||
<el-col :span="12" class="card-box">
|
<el-col :span="12" class="card-box">
|
||||||
<el-card>
|
<el-card>
|
||||||
<template #header><span>命令统计</span></template>
|
<template #header><span>命令统计</span></template>
|
||||||
<div ref="commandstats" style="height: 420px" />
|
<div ref="commandChartRef" style="height: 420px" />
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" class="card-box">
|
<el-col :span="12" class="card-box">
|
||||||
<el-card>
|
<el-card>
|
||||||
<template #header><span>内存信息</span></template>
|
<template #header><span>内存信息</span></template>
|
||||||
<div ref="usedmemory" style="height: 420px" />
|
<div ref="memoryChartRef" style="height: 420px" />
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -48,8 +48,8 @@ defineOptions({
|
|||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
|
|
||||||
const cacheInfoTable = ref([]);
|
const cacheInfoTable = ref([]);
|
||||||
const commandstats = ref(null);
|
const commandChartRef = ref(null);
|
||||||
const usedmemory = ref(null);
|
const memoryChartRef = ref(null);
|
||||||
|
|
||||||
async function getList() {
|
async function getList() {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
@ -110,8 +110,8 @@ async function getList() {
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
const commandstatsIntance = echarts.init(commandstats.value, "macarons");
|
const commandChartInstance = echarts.init(commandChartRef.value, "macarons");
|
||||||
commandstatsIntance.setOption({
|
commandChartInstance.setOption({
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: "item",
|
trigger: "item",
|
||||||
formatter: "{a} <br/>{b} : {c} ({d}%)"
|
formatter: "{a} <br/>{b} : {c} ({d}%)"
|
||||||
@ -129,8 +129,8 @@ async function getList() {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
const usedmemoryInstance = echarts.init(usedmemory.value, "macarons");
|
const memoryChartInstance = echarts.init(memoryChartRef.value, "macarons");
|
||||||
usedmemoryInstance.setOption({
|
memoryChartInstance.setOption({
|
||||||
tooltip: {
|
tooltip: {
|
||||||
formatter: `{b} <br/>{a} : ${cacheInfo.info.used_memory_human}`
|
formatter: `{b} <br/>{a} : ${cacheInfo.info.used_memory_human}`
|
||||||
},
|
},
|
||||||
|
@ -10,7 +10,7 @@ import Refresh from "@iconify-icons/ep/refresh";
|
|||||||
|
|
||||||
/** 组件name最好和菜单表中的router_name一致 */
|
/** 组件name最好和菜单表中的router_name一致 */
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "SystemOperationLog"
|
name: "OnlineUser"
|
||||||
});
|
});
|
||||||
|
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user