[pve-devel] [PATCH manager 2/2] www: utils: fix inconsistency in host cpu usage display in search view
Christoph Heiss
c.heiss at proxmox.com
Wed Jul 17 14:49:51 CEST 2024
Between the number of CPUs and the actual label, a space was missing -
resulting in an inconsistency vs. the "CPU usage" column.
Signed-off-by: Christoph Heiss <c.heiss at proxmox.com>
---
www/manager6/Utils.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index ddef11bb1..6a0ecc98f 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -1078,8 +1078,9 @@ Ext.define('PVE.Utils', {
}
var per = (record.data.cpu/maxcpu) * record.data.maxcpu * 100;
+ const cpu_label = maxcpu > 1 ? 'CPUs' : 'CPU';
- return per.toFixed(1) + '% of ' + maxcpu.toString() + (maxcpu > 1 ? 'CPUs' : 'CPU');
+ return `${per.toFixed(1)}% of ${maxcpu} ${cpu_label}`;
},
render_bandwidth: function(value) {
--
2.45.1
More information about the pve-devel
mailing list