mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-07 14:51:37 +00:00
ui: resource tree: add usage percentage to storage tooltip
it is a bit more verbose than the usage bar Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
1ed8e0096b
commit
872e9978fd
@ -146,6 +146,12 @@ Ext.define('PVE.tree.ResourceTree', {
|
|||||||
if (info.hastate !== 'unmanaged') {
|
if (info.hastate !== 'unmanaged') {
|
||||||
qtips.push(gettext('HA State') + ": " + info.hastate);
|
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(', ');
|
let tip = qtips.join(', ');
|
||||||
info.tip = tip;
|
info.tip = tip;
|
||||||
|
Loading…
Reference in New Issue
Block a user