all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH proxmox_dart_api_client/pve_flutter_frontend 0/2] fix: ui: `unknown` status shown when the QEMU state is `prelaunch`
@ 2025-06-03 14:56 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
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Shan Shaji @ 2025-06-03 14:56 UTC (permalink / raw)
  To: pve-devel

This patch series fixes an issue where the VM status was
shown as `unknown` when the QEMU state is `prelaunch`. Additionaly,
also fixes the resume option missing inside the power settings sheet
when the QEMU state is `prelaunch`.

Steps to reproduce:
  - Select any VM
  - Go to the options tab. 
  - Enable "Freeze CPU at startup"
  - Start the VM on web UI
  - Go to mobile app ui and check the status of the VM
    on the resources tab and on the VM overview page. 
    The status will be `unknown`. 
  - Now on the VM overview page click on the `power settings` 
    option on the app UI. The resume option is not shown.

pve_flutter_frontend:

Shan Shaji (1):
  fix: qemu: `unknown` status shown when VM is in `prelaunch` status

 lib/widgets/pve_qemu_power_settings_widget.dart  | 3 ++-
 lib/widgets/pve_resource_status_chip_widget.dart | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)


proxmox_dart_api_client:

Shan Shaji (1):
  fix: add missing `prelaunch` value to `PveResourceStatusType`

 lib/src/models/pve_cluster_resources_model.dart | 3 +++
 lib/src/models/pve_nodes_qemu_status_model.dart | 2 ++
 2 files changed, 5 insertions(+)


Summary over all repositories:
  4 files changed, 10 insertions(+), 1 deletions(-)

-- 
Generated by git-murpp 0.8.1


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


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

* [pve-devel] [PATCH pve_flutter_frontend 1/1] fix: qemu: `unknown` status shown when VM is in `prelaunch` status
  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 ` Shan Shaji
  2025-06-03 14:56 ` [pve-devel] [PATCH proxmox_dart_api_client 1/1] fix: add missing `prelaunch` value to `PveResourceStatusType` Shan Shaji
  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
  2 siblings, 0 replies; 4+ messages in thread
From: Shan Shaji @ 2025-06-03 14:56 UTC (permalink / raw)
  To: pve-devel

When the VM starts up, if the `Freeze CPU at startup` option value is
set to `true` the VM status is shown as `unknown`. However when testing
the same on web UI, the UI shows the `prelaunch` status when
hovering over the VM.

Additionally the resume option is missing in the app UI, which should
have been found under the power settings. To create feature parity a
new `prelaunch` value has been added in the `PveResourceStatusType`
enum. The new value is used to fix the unknown status and resume
option not being shown.

Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---
 lib/widgets/pve_qemu_power_settings_widget.dart  | 3 ++-
 lib/widgets/pve_resource_status_chip_widget.dart | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/widgets/pve_qemu_power_settings_widget.dart b/lib/widgets/pve_qemu_power_settings_widget.dart
index e402b83..b4c3c0a 100644
--- a/lib/widgets/pve_qemu_power_settings_widget.dart
+++ b/lib/widgets/pve_qemu_power_settings_widget.dart
@@ -40,7 +40,8 @@ class PveQemuPowerSettings extends StatelessWidget {
                       ),
                     if ([
                           PveResourceStatusType.paused,
-                          PveResourceStatusType.suspended
+                          PveResourceStatusType.suspended,
+                          PveResourceStatusType.prelaunch,
                         ].contains(qemuStatus) &&
                         !(state.currentStatus!.template ?? false))
                       ListTile(
diff --git a/lib/widgets/pve_resource_status_chip_widget.dart b/lib/widgets/pve_resource_status_chip_widget.dart
index c3d3f69..1b0038d 100644
--- a/lib/widgets/pve_resource_status_chip_widget.dart
+++ b/lib/widgets/pve_resource_status_chip_widget.dart
@@ -44,6 +44,9 @@ class StatusChip extends StatelessWidget {
         statusColor = intermediateColor;
         statusText = 'suspending';
         break;
+      case PveResourceStatusType.prelaunch:
+        statusColor = offlineColor;
+        statusText = 'prelaunch';
       default:
         statusColor = offlineColor;
         statusText = 'unknown';
-- 
2.39.5



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


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

* [pve-devel] [PATCH proxmox_dart_api_client 1/1] fix: add missing `prelaunch` value to `PveResourceStatusType`
  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
  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
  2 siblings, 0 replies; 4+ messages in thread
From: Shan Shaji @ 2025-06-03 14:56 UTC (permalink / raw)
  To: pve-devel

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


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

* [pve-devel] applied: [PATCH proxmox_dart_api_client/pve_flutter_frontend 0/2] fix: ui: `unknown` status shown when the QEMU state is `prelaunch`
  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 ` [pve-devel] [PATCH proxmox_dart_api_client 1/1] fix: add missing `prelaunch` value to `PveResourceStatusType` Shan Shaji
@ 2025-06-04 11:11 ` Dominik Csapak
  2 siblings, 0 replies; 4+ messages in thread
From: Dominik Csapak @ 2025-06-04 11:11 UTC (permalink / raw)
  To: pve-devel

On 6/3/25 16:56, Shan Shaji wrote:
> This patch series fixes an issue where the VM status was
> shown as `unknown` when the QEMU state is `prelaunch`. Additionaly,
> also fixes the resume option missing inside the power settings sheet
> when the QEMU state is `prelaunch`.
> 
> Steps to reproduce:
>    - Select any VM
>    - Go to the options tab.
>    - Enable "Freeze CPU at startup"
>    - Start the VM on web UI
>    - Go to mobile app ui and check the status of the VM
>      on the resources tab and on the VM overview page.
>      The status will be `unknown`.
>    - Now on the VM overview page click on the `power settings`
>      option on the app UI. The resume option is not shown.
> 
> pve_flutter_frontend:
> 
> Shan Shaji (1):
>    fix: qemu: `unknown` status shown when VM is in `prelaunch` status
> 
>   lib/widgets/pve_qemu_power_settings_widget.dart  | 3 ++-
>   lib/widgets/pve_resource_status_chip_widget.dart | 3 +++
>   2 files changed, 5 insertions(+), 1 deletion(-)
> 
> 
> proxmox_dart_api_client:
> 
> Shan Shaji (1):
>    fix: add missing `prelaunch` value to `PveResourceStatusType`
> 
>   lib/src/models/pve_cluster_resources_model.dart | 3 +++
>   lib/src/models/pve_nodes_qemu_status_model.dart | 2 ++
>   2 files changed, 5 insertions(+)
> 
> 
> Summary over all repositories:
>    4 files changed, 10 insertions(+), 1 deletions(-)
> 


applied series, thanks!


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


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

end of thread, other threads:[~2025-06-04 11:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [pve-devel] [PATCH proxmox_dart_api_client 1/1] fix: add missing `prelaunch` value to `PveResourceStatusType` Shan Shaji
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

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