From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH manager] ui: utils: do not display 0% disk usage for vms
Date: Fri, 12 Jun 2026 12:08:51 +0200 [thread overview]
Message-ID: <20260612100856.243493-1-m.sandoval@proxmox.com> (raw)
Getting the disk usage of a VM requires to query the QEMU guest
agent (get-fsinfo) and at the moment the {vmid}/status/current does not
talk to the agent so reporting this information would require a
non-trivial changes.
Before the eslint fixes, the UI was not displaying disk usage so we
revet back to that rather than always reporting 0%.
Fixes: 4d739f4a (ui: utils: eslint fixes and code cleanup/refactoring)
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
Notes:
- quickly tested on a pve 9.2 vm
- checked that make tidy does not change this back
- Appeared in ticket #7270568
www/manager6/Utils.js | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index bbf59d8f4..040b5ae01 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -1272,7 +1272,8 @@ Ext.define('PVE.Utils', {
calculate_disk_usage: function (data) {
if (
!Ext.isNumeric(data.disk) ||
- ((data.type === 'qemu' || data.type === 'lxc') && data.uptime === 0) ||
+ data.type === 'qemu' ||
+ (data.type === 'lxc' && data.uptime === 0) ||
data.maxdisk === 0
) {
return -1;
@@ -1297,7 +1298,8 @@ Ext.define('PVE.Utils', {
if (
!Ext.isNumeric(disk) ||
maxdisk === 0 ||
- ((type === 'qemu' || type === 'lxc') && record.data.uptime === 0)
+ type === 'qemu' ||
+ (type === 'lxc' && record.data.uptime === 0)
) {
return '';
}
--
2.47.3
next reply other threads:[~2026-06-12 10:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-12 10:08 Maximiliano Sandoval [this message]
2026-06-12 13:07 ` applied: [PATCH manager] ui: utils: do not display 0% disk usage for vms Dominik Csapak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260612100856.243493-1-m.sandoval@proxmox.com \
--to=m.sandoval@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.