From: Shan Shaji <s.shaji@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH proxmox_dart_api_client 2/2] fix: ui: add missing `paused` status check
Date: Tue, 20 May 2025 10:05:27 +0200 [thread overview]
Message-ID: <20250520080527.37594-3-s.shaji@proxmox.com> (raw)
In-Reply-To: <20250520080527.37594-1-s.shaji@proxmox.com>
The `getStatus` function was not returning the corresponding
`PveResourceStatusType` when the status was `paused`. This commit adds
the missing status check.
Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---
.../models/pve_cluster_resources_model.dart | 24 +++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/lib/src/models/pve_cluster_resources_model.dart b/lib/src/models/pve_cluster_resources_model.dart
index 1f69213..19986f1 100644
--- a/lib/src/models/pve_cluster_resources_model.dart
+++ b/lib/src/models/pve_cluster_resources_model.dart
@@ -11,30 +11,49 @@ abstract class PveClusterResourcesModel
_$pveClusterResourcesModelSerializer;
String get id;
+
String get type;
double? get cpu;
+
int? get disk;
+
String? get hastate;
+
String? get level;
+
double? get maxcpu;
+
int? get maxdisk;
+
int? get maxmem;
+
int? get mem;
+
String? get name;
+
String? get node;
+
String? get pool;
+
String? get status;
+
bool? get shared;
+
String? get storage;
+
int? get uptime;
+
int? get vmid;
+
String? get lock;
+
bool? get template;
factory PveClusterResourcesModel(
[void Function(PveClusterResourcesModelBuilder)? updates]) =
_$PveClusterResourcesModel;
+
PveClusterResourcesModel._();
String get displayName {
@@ -69,6 +88,8 @@ abstract class PveClusterResourcesModel
return PveResourceStatusType.stopped;
}
+ if (status == 'paused') return PveResourceStatusType.paused;
+
return PveResourceStatusType.unkown;
}
}
@@ -82,6 +103,7 @@ class PveClusterResourceType extends EnumClass {
const PveClusterResourceType._(super.name);
static BuiltSet<PveClusterResourceType> get values => _$pcrtValues;
+
static PveClusterResourceType valueOf(String name) => _$pcrtValueOf(name);
}
@@ -99,6 +121,7 @@ class PveClusterResourceAction extends EnumClass {
static BuiltSet<PveClusterResourceAction> get values =>
_$pveClusterResourceActionValues;
+
static PveClusterResourceAction valueOf(String name) =>
_$pveClusterResourceActionValueOf(name);
}
@@ -114,6 +137,7 @@ class PveResourceStatusType extends EnumClass {
const PveResourceStatusType._(super.name);
static BuiltSet<PveResourceStatusType> get values => _$pqsTValues;
+
static PveResourceStatusType valueOf(String name) => _$pqsTValueOf(name);
static Serializer<PveResourceStatusType> get serializer =>
--
2.39.5 (Apple Git-154)
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-05-20 8:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-20 8:05 [pve-devel] [PATCH proxmox_dart_api_client/pve_flutter_frontend 0/2] fix: ui: missing guest in resources tab when status is `paused` Shan Shaji
2025-05-20 8:05 ` [pve-devel] [PATCH pve_flutter_frontend 1/2] fix: ui: missing guests in resource " Shan Shaji
2025-05-21 12:13 ` Dominik Csapak
2025-05-20 8:05 ` Shan Shaji [this message]
2025-05-21 11:59 ` [pve-devel] [PATCH proxmox_dart_api_client 2/2] fix: ui: add missing `paused` status check 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=20250520080527.37594-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal