all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pdm-devel] [PATCH datacenter-manager] ui: pve: correctly count 'total' cores/memory
@ 2025-01-13 10:09 Dominik Csapak
  2025-01-15 15:30 ` [pdm-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2025-01-13 10:09 UTC (permalink / raw)
  To: pdm-devel

so the number is what it says in the text ('total configured'), not the
configured but not running/currently used.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 ui/src/pve/remote.rs | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/ui/src/pve/remote.rs b/ui/src/pve/remote.rs
index 9a365e4..aafed5d 100644
--- a/ui/src/pve/remote.rs
+++ b/ui/src/pve/remote.rs
@@ -81,10 +81,9 @@ impl RemotePanelComp {
                 }
                 PveResource::Qemu(qemu) => {
                     guests += 1;
-                    if qemu.status == "stopped" {
-                        guest_cores += qemu.maxcpu;
-                        guest_memory += qemu.maxmem;
-                    } else {
+                    guest_cores += qemu.maxcpu;
+                    guest_memory += qemu.maxmem;
+                    if qemu.status != "stopped" {
                         guests_running += 1;
                         guest_cores_running += qemu.maxcpu;
                         guest_memory_running += qemu.maxmem;
@@ -92,10 +91,9 @@ impl RemotePanelComp {
                 }
                 PveResource::Lxc(lxc) => {
                     guests += 1;
-                    if lxc.status == "stopped" {
-                        guest_cores += lxc.maxcpu;
-                        guest_memory += lxc.maxmem;
-                    } else {
+                    guest_cores += lxc.maxcpu;
+                    guest_memory += lxc.maxmem;
+                    if lxc.status != "stopped" {
                         guests_running += 1;
                         guest_cores_running += lxc.maxcpu;
                         guest_memory_running += lxc.maxmem;
-- 
2.39.5



_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


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

* [pdm-devel] applied: [PATCH datacenter-manager] ui: pve: correctly count 'total' cores/memory
  2025-01-13 10:09 [pdm-devel] [PATCH datacenter-manager] ui: pve: correctly count 'total' cores/memory Dominik Csapak
@ 2025-01-15 15:30 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2025-01-15 15:30 UTC (permalink / raw)
  To: Proxmox Datacenter Manager development discussion, Dominik Csapak

Am 13.01.25 um 11:09 schrieb Dominik Csapak:
> so the number is what it says in the text ('total configured'), not the
> configured but not running/currently used.
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
>  ui/src/pve/remote.rs | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)
> 
>

for the record: this was applied already...


_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


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

end of thread, other threads:[~2025-01-15 15:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-13 10:09 [pdm-devel] [PATCH datacenter-manager] ui: pve: correctly count 'total' cores/memory Dominik Csapak
2025-01-15 15:30 ` [pdm-devel] applied: " Thomas Lamprecht

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