new - vCPUs

This commit is contained in:
mhsanaei
2024-05-28 15:11:46 +02:00
parent adcfccbe45
commit baf8c94b2e
2 changed files with 16 additions and 1 deletions

View File

@@ -45,7 +45,12 @@
<a-progress type="dashboard" status="normal"
:stroke-color="status.cpu.color"
:percent="status.cpu.percent"></a-progress>
<div><b>CPU:</b> [[ cpuCoreFormat(status.cpuCores) ]]</div>
<div><b>CPU:</b> [[ cpuCoreFormat(status.cpuCores) ]] <a-tooltip>
<a-icon type="info-circle"></a-icon>
<template slot="title">
<div><b>Logical Processors(vCPUs):</b> [[ (status.logicalPro) ]]</div>
</template>
</a-tooltip></div>
<div><b>Speed:</b> [[ cpuSpeedFormat(status.cpuSpeedMhz) ]]</div>
</a-col>
<a-col :span="12" style="text-align: center">
@@ -367,6 +372,7 @@
constructor(data) {
this.cpu = new CurTotal(0, 0);
this.cpuCores = 0;
this.logicalPro = 0;
this.cpuSpeedMhz = 0;
this.disk = new CurTotal(0, 0);
this.loads = [0, 0, 0];
@@ -387,6 +393,7 @@
}
this.cpu = new CurTotal(data.cpu, 100);
this.cpuCores = data.cpuCores;
this.logicalPro = data.logicalPro;
this.cpuSpeedMhz = data.cpuSpeedMhz;
this.disk = new CurTotal(data.disk.current, data.disk.total);
this.loads = data.loads.map(load => toFixed(load, 2));