diff --git a/web/assets/js/util/common.js b/web/assets/js/util/common.js index ab642849e..d35c5208a 100644 --- a/web/assets/js/util/common.js +++ b/web/assets/js/util/common.js @@ -22,6 +22,19 @@ function sizeFormat(size) { } } +function cpuSpeedFormat(speed) { + const GHz = speed / 1000; + return GHz.toFixed(2) + " GHz"; +} + +function cpuCoreFormat(cores) { + if (cores === 1) { + return "1 Core"; + } else { + return cores + " Cores"; + } +} + function base64(str) { return Base64.encode(str); } diff --git a/web/html/xui/index.html b/web/html/xui/index.html index 7d919a30a..5b42ca5d4 100644 --- a/web/html/xui/index.html +++ b/web/html/xui/index.html @@ -34,8 +34,8 @@ :stroke-color="status.cpu.color" :class="themeSwitcher.darkCardClass" :percent="status.cpu.percent"> -
Cores: [[ status.cpuCores ]]
-
Logical Procs: [[ status.logicalProcessors ]]
+
CPU: [[ cpuCoreFormat(status.cpuCores) ]]
+
Speed: [[ cpuSpeedFormat(status.cpuSpeedMhz) ]]
- [[ sizeFormat(status.netIO.up) ]] / S + [[ sizeFormat(status.netIO.up) ]]/S