Browse Source

【更新】更新系统监控界面代码格式及逻辑

pull/146/MERGE
小诺 1 year ago committed by 俞宝山
parent
commit
154d2e1675
  1. 37
      snowy-admin-web/src/views/dev/monitor/index.vue

37
snowy-admin-web/src/views/dev/monitor/index.vue

@ -167,24 +167,31 @@
const getMonitorServerInfo = () => {
spinning.value = true
monitorApi.monitorServerInfo().then((data) => {
spinning.value = false
networkSpinning.value = true
devMonitorCpuInfo.value = data.devMonitorCpuInfo
devMonitorMemoryInfo.value = data.devMonitorMemoryInfo
devMonitorStorageInfo.value = data.devMonitorStorageInfo
devMonitorServerInfo.value = data.devMonitorServerInfo
devMonitorJvmInfo.value = data.devMonitorJvmInfo
})
monitorApi
.monitorServerInfo()
.then((data) => {
devMonitorCpuInfo.value = data.devMonitorCpuInfo
devMonitorMemoryInfo.value = data.devMonitorMemoryInfo
devMonitorStorageInfo.value = data.devMonitorStorageInfo
devMonitorServerInfo.value = data.devMonitorServerInfo
devMonitorJvmInfo.value = data.devMonitorJvmInfo
})
.finally(() => {
spinning.value = false
})
}
const getMonitorNetworkInfo = () => {
networkSpinning.value = true
networkSpinning.value = spinning.value ? false : networkSpinning.value
monitorApi.monitorNetworkInfo().then((data) => {
networkSpinning.value = false
devMonitorNetworkInfo.value = data.devMonitorNetworkInfo
})
monitorApi
.monitorNetworkInfo()
.then((data) => {
networkSpinning.value = false
devMonitorNetworkInfo.value = data.devMonitorNetworkInfo
})
.finally(() => {
networkSpinning.value = false
})
}
// 30绿30-80 80
@ -205,6 +212,6 @@
text-align: center;
}
:deep(.ant-card-extra) {
padding: 8px 0!important;
padding: 8px 0 !important;
}
</style>

Loading…
Cancel
Save