[pve-devel] [PATCH manager 3/3] ui: resource tree: add usage percentage to storage tooltip
Dominik Csapak
d.csapak at proxmox.com
Fri Nov 10 11:13:00 CET 2023
it is a bit more verbose than the usage bar
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/tree/ResourceTree.js | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/www/manager6/tree/ResourceTree.js b/www/manager6/tree/ResourceTree.js
index ed51ac32..acfa545a 100644
--- a/www/manager6/tree/ResourceTree.js
+++ b/www/manager6/tree/ResourceTree.js
@@ -146,6 +146,12 @@ Ext.define('PVE.tree.ResourceTree', {
if (info.hastate !== 'unmanaged') {
qtips.push(gettext('HA State') + ": " + info.hastate);
}
+ if (info.type === 'storage') {
+ let usage = info.disk / info.maxdisk;
+ if (usage >= 0.0 && usage <= 1.0) {
+ qtips.push(Ext.String.format(gettext("Usage: {0}%"), (usage*100).toFixed(2)));
+ }
+ }
let tip = qtips.join(', ');
info.tip = tip;
--
2.30.2
More information about the pve-devel
mailing list