all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Shan Shaji <s.shaji@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH proxmox_dart_api_client 1/1] fix: add missing `prelaunch` value to `PveResourceStatusType`
Date: Tue,  3 Jun 2025 16:56:43 +0200	[thread overview]
Message-ID: <20250603145643.243019-3-s.shaji@proxmox.com> (raw)
In-Reply-To: <20250603145643.243019-1-s.shaji@proxmox.com>

Updates the `PveResourceStatusType` enum with `prelaunch` option. Also
adds the status checks in `getStatus` and `getQemuStatus` functions.
The changes are necessary inorder to show the `prelaunch`
status in the qemu overview page and in the resources tab view.

Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---
 lib/src/models/pve_cluster_resources_model.dart | 3 +++
 lib/src/models/pve_nodes_qemu_status_model.dart | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/lib/src/models/pve_cluster_resources_model.dart b/lib/src/models/pve_cluster_resources_model.dart
index 16e18df..51ea8fa 100644
--- a/lib/src/models/pve_cluster_resources_model.dart
+++ b/lib/src/models/pve_cluster_resources_model.dart
@@ -69,6 +69,8 @@ abstract class PveClusterResourcesModel
       return PveResourceStatusType.stopped;
     }
 
+    if(status == 'prelaunch') return PveResourceStatusType.prelaunch;
+
     return PveResourceStatusType.unknown;
   }
 }
@@ -110,6 +112,7 @@ class PveResourceStatusType extends EnumClass {
   static const PveResourceStatusType suspending = _$suspending;
   static const PveResourceStatusType suspended = _$suspended;
   static const PveResourceStatusType unknown = _$unknown;
+  static const PveResourceStatusType prelaunch = _$prelaunch;
 
   const PveResourceStatusType._(super.name);
 
diff --git a/lib/src/models/pve_nodes_qemu_status_model.dart b/lib/src/models/pve_nodes_qemu_status_model.dart
index ae82802..3b2d7a8 100644
--- a/lib/src/models/pve_nodes_qemu_status_model.dart
+++ b/lib/src/models/pve_nodes_qemu_status_model.dart
@@ -42,6 +42,8 @@ abstract class PveQemuStatusModel
           return PveResourceStatusType.running;
         case 'paused':
           return PveResourceStatusType.paused;
+        case 'prelaunch':
+          return PveResourceStatusType.prelaunch;
         default:
           if (lock == 'suspending') {
             return PveResourceStatusType.suspending;
-- 
2.39.5



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


  parent reply	other threads:[~2025-06-03 14:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-03 14:56 [pve-devel] [PATCH proxmox_dart_api_client/pve_flutter_frontend 0/2] fix: ui: `unknown` status shown when the QEMU state is `prelaunch` Shan Shaji
2025-06-03 14:56 ` [pve-devel] [PATCH pve_flutter_frontend 1/1] fix: qemu: `unknown` status shown when VM is in `prelaunch` status Shan Shaji
2025-06-03 14:56 ` Shan Shaji [this message]
2025-06-04 11:11 ` [pve-devel] applied: [PATCH proxmox_dart_api_client/pve_flutter_frontend 0/2] fix: ui: `unknown` status shown when the QEMU state is `prelaunch` 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=20250603145643.243019-3-s.shaji@proxmox.com \
    --to=s.shaji@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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal