all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH manager] ui: utils: do not display 0% disk usage for vms
@ 2026-06-12 10:08 Maximiliano Sandoval
  2026-06-12 13:07 ` applied: " Dominik Csapak
  0 siblings, 1 reply; 2+ messages in thread
From: Maximiliano Sandoval @ 2026-06-12 10:08 UTC (permalink / raw)
  To: pve-devel

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





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* applied: [PATCH manager] ui: utils: do not display 0% disk usage for vms
  2026-06-12 10:08 [PATCH manager] ui: utils: do not display 0% disk usage for vms Maximiliano Sandoval
@ 2026-06-12 13:07 ` Dominik Csapak
  0 siblings, 0 replies; 2+ messages in thread
From: Dominik Csapak @ 2026-06-12 13:07 UTC (permalink / raw)
  To: pve-devel, Maximiliano Sandoval

On Fri, 12 Jun 2026 12:08:51 +0200, Maximiliano Sandoval wrote:
> 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%.
> 
> [...]

Applied, thanks!

[1/1] ui: utils: do not display 0% disk usage for vms
      commit: a03f74498e7ef0a3731d90198509b5c6b1fe7aa7




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-06-12 13:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-12 10:08 [PATCH manager] ui: utils: do not display 0% disk usage for vms Maximiliano Sandoval
2026-06-12 13:07 ` applied: " Dominik Csapak

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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal