From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 6E14D1FF183 for ; Wed, 21 May 2025 14:00:27 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 569D4177B0; Wed, 21 May 2025 14:00:27 +0200 (CEST) Message-ID: <6e555ba6-5df0-4e31-a313-e963e74056a5@proxmox.com> Date: Wed, 21 May 2025 13:59:54 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta To: pve-devel@lists.proxmox.com References: <20250520080527.37594-1-s.shaji@proxmox.com> <20250520080527.37594-3-s.shaji@proxmox.com> Content-Language: en-US From: Dominik Csapak In-Reply-To: <20250520080527.37594-3-s.shaji@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL 0.022 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH proxmox_dart_api_client 2/2] fix: ui: add missing `paused` status check X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" 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 > --- > .../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 get values => _$pcrtValues; > + > static PveClusterResourceType valueOf(String name) => _$pcrtValueOf(name); > } > > @@ -99,6 +121,7 @@ class PveClusterResourceAction extends EnumClass { > > static BuiltSet get values => > _$pveClusterResourceActionValues; > + > static PveClusterResourceAction valueOf(String name) => > _$pveClusterResourceActionValueOf(name); > } > @@ -114,6 +137,7 @@ class PveResourceStatusType extends EnumClass { > const PveResourceStatusType._(super.name); > > static BuiltSet get values => _$pqsTValues; > + > static PveResourceStatusType valueOf(String name) => _$pqsTValueOf(name); > > static Serializer get serializer => _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel