From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH proxmox_dart_api_client 2/2] fix: ui: add missing `paused` status check
Date: Wed, 21 May 2025 13:59:54 +0200 [thread overview]
Message-ID: <6e555ba6-5df0-4e31-a313-e963e74056a5@proxmox.com> (raw)
In-Reply-To: <20250520080527.37594-3-s.shaji@proxmox.com>
Please don't send unrelated changes for the patch, since this one
adds a bunch of (unnecessary) empty lines.
Iff there is a reason for this change (e.g. the dart formatter wants to do this)
please send these changes upfront in a seperate patch.
Thanks!
On 5/20/25 10:05, Shan Shaji wrote:
> 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 =>
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
prev parent reply other threads:[~2025-05-21 12:00 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 ` [pve-devel] [PATCH proxmox_dart_api_client 2/2] fix: ui: add missing `paused` status check Shan Shaji
2025-05-21 11:59 ` Dominik Csapak [this message]
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=6e555ba6-5df0-4e31-a313-e963e74056a5@proxmox.com \
--to=d.csapak@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.