[pve-devel] [PATCH widget-toolkit] RDD: don't display power-of-two suffix 'i' for values without unit suffix
Matthias Heiserer
m.heiserer at proxmox.com
Mon Oct 10 11:55:07 CEST 2022
So instead of showing "0 i" (meaning e.g. 0 Gi), just display "0".
Signed-off-by: Matthias Heiserer <m.heiserer at proxmox.com>
---
I couldn't come up with a shorter commit message, feel free to change it.
src/panel/RRDChart.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/panel/RRDChart.js b/src/panel/RRDChart.js
index 41533ea..263070a 100644
--- a/src/panel/RRDChart.js
+++ b/src/panel/RRDChart.js
@@ -92,7 +92,7 @@ Ext.define('Proxmox.widget.RRDChart', {
value = Ext.util.Format.number(value, format);
let unit = units[si];
- if (this.powerOfTwo) unit += 'i';
+ if (unit && this.powerOfTwo) unit += 'i';
return `${value.toString()} ${unit}`;
},
--
2.30.2
More information about the pve-devel
mailing list