refactor: 注释掉不必要的内存和CPU使用率计算逻辑
This commit is contained in:
@@ -232,23 +232,23 @@ function fnTableSelectedRowKeys(keys: (string | number)[]) {
|
|||||||
}
|
}
|
||||||
tableState.selectedRowKeys = keys;
|
tableState.selectedRowKeys = keys;
|
||||||
// Mem 将KB转换为MB
|
// Mem 将KB转换为MB
|
||||||
const totalMemInKB = neState.mem?.totalMem;
|
// const totalMemInKB = neState.mem?.totalMem;
|
||||||
const nfUsedMemInKB = neState.mem?.nfUsedMem;
|
// const nfUsedMemInKB = neState.mem?.nfUsedMem;
|
||||||
const sysMemUsageInKB = neState.mem?.sysMemUsage;
|
// const sysMemUsageInKB = neState.mem?.sysMemUsage;
|
||||||
const totalMemInMB = Math.round((totalMemInKB / 1024) * 100) / 100;
|
// const totalMemInMB = Math.round((totalMemInKB / 1024) * 100) / 100;
|
||||||
const nfUsedMemInMB = Math.round((nfUsedMemInKB / 1024) * 100) / 100;
|
// const nfUsedMemInMB = Math.round((nfUsedMemInKB / 1024) * 100) / 100;
|
||||||
const sysMemUsageInMB = Math.round((sysMemUsageInKB / 1024) * 100) / 100;
|
// const sysMemUsageInMB = Math.round((sysMemUsageInKB / 1024) * 100) / 100;
|
||||||
|
|
||||||
// CPU
|
// CPU
|
||||||
const nfCpu = neState.cpu?.nfCpuUsage;
|
// const nfCpu = neState.cpu?.nfCpuUsage;
|
||||||
const sysCpu = neState.cpu?.sysCpuUsage;
|
// const sysCpu = neState.cpu?.sysCpuUsage;
|
||||||
const nfCpuP = Math.round(nfCpu) / 100;
|
// const nfCpuP = Math.round(nfCpu) / 100;
|
||||||
const sysCpuP = Math.round(sysCpu) / 100;
|
// const sysCpuP = Math.round(sysCpu) / 100;
|
||||||
|
|
||||||
serverState.value = Object.assign(
|
serverState.value = Object.assign(
|
||||||
{
|
{
|
||||||
cpuUse: `NE:${nfCpuP}%; SYS:${sysCpuP}%`,
|
// cpuUse: `NE:${nfCpuP}%; SYS:${sysCpuP}%`,
|
||||||
memoryUse: `Total: ${totalMemInMB}MB; NE: ${nfUsedMemInMB}MB; SYS: ${sysMemUsageInMB}MB`,
|
// memoryUse: `Total: ${totalMemInMB}MB; NE: ${nfUsedMemInMB}MB; SYS: ${sysMemUsageInMB}MB`,
|
||||||
},
|
},
|
||||||
neState
|
neState
|
||||||
);
|
);
|
||||||
@@ -369,12 +369,12 @@ onBeforeUnmount(() => {
|
|||||||
<a-descriptions-item :label="t('views.index.capability')">
|
<a-descriptions-item :label="t('views.index.capability')">
|
||||||
{{ serverState.capability }}
|
{{ serverState.capability }}
|
||||||
</a-descriptions-item>
|
</a-descriptions-item>
|
||||||
<a-descriptions-item :label="t('views.index.cpuUse')">
|
<!-- <a-descriptions-item :label="t('views.index.cpuUse')">
|
||||||
{{ serverState.cpuUse }}
|
{{ serverState.cpuUse }}
|
||||||
</a-descriptions-item>
|
</a-descriptions-item>
|
||||||
<a-descriptions-item :label="t('views.index.memoryUse')">
|
<a-descriptions-item :label="t('views.index.memoryUse')">
|
||||||
{{ serverState.memoryUse }}
|
{{ serverState.memoryUse }}
|
||||||
</a-descriptions-item>
|
</a-descriptions-item> -->
|
||||||
<a-descriptions-item :label="t('views.index.serialNum')">
|
<a-descriptions-item :label="t('views.index.serialNum')">
|
||||||
{{ serverState.sn }}
|
{{ serverState.sn }}
|
||||||
</a-descriptions-item>
|
</a-descriptions-item>
|
||||||
|
|||||||
Reference in New Issue
Block a user