public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH proxmox_dart_api_client/pve_flutter_frontend v3 0/2] fix: resources: add filter option for `paused` guest status
@ 2025-06-05  9:41 Shan Shaji
  2025-06-05  9:41 ` [pve-devel] [PATCH pve_flutter_frontend v3 1/1] " Shan Shaji
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Shan Shaji @ 2025-06-05  9:41 UTC (permalink / raw)
  To: pve-devel

This patch series adds a new `paused` filter option in the resources
filter drawer. Additionaly also fixes the `unkown` status shown on the 
guest in the resources tab when the status is `paused`. 

History:
========

v2: https://lore.proxmox.com/pve-devel/664b1efd-7b30-4796-b933-f2071adbd1e8@proxmox.com/T/#t

changes since v2:
* fix commit messages.
* rebase the changes with master. 

pve_flutter_frontend:

Shan Shaji (1):
  fix: resources: add filter option for `paused` guest status

 .../pve_mobile_resource_filter_sheet.dart     | 40 +++++++------------
 1 file changed, 15 insertions(+), 25 deletions(-)


proxmox_dart_api_client:

Shan Shaji (1):
  fix: ui: add missing `paused` status check

 lib/src/models/pve_cluster_resources_model.dart | 2 ++
 1 file changed, 2 insertions(+)


Summary over all repositories:
  2 files changed, 17 insertions(+), 25 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 v3 1/1] fix: resources: add filter option for `paused` guest status
  2025-06-05  9:41 [pve-devel] [PATCH proxmox_dart_api_client/pve_flutter_frontend v3 0/2] fix: resources: add filter option for `paused` guest status Shan Shaji
@ 2025-06-05  9:41 ` Shan Shaji
  2025-06-05  9:41 ` [pve-devel] [PATCH proxmox_dart_api_client v3 1/1] fix: ui: add missing `paused` status check Shan Shaji
  2025-07-01 11:55 ` [pve-devel] applied: [PATCH proxmox_dart_api_client/pve_flutter_frontend v3 0/2] fix: resources: add filter option for `paused` guest status Dominik Csapak
  2 siblings, 0 replies; 4+ messages in thread
From: Shan Shaji @ 2025-06-05  9:41 UTC (permalink / raw)
  To: pve-devel

In the resources tab there were no option to filter the guest
when the status is `paused`. To fix the issue, add new `paused`
filter option under status section of the drawer.

Additionaly rather than copy pasting the
`_ProxmoxResourceFilterLisTile`, add a for loop that will
iterate over all the statuses.

Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---

 changes since v2:
 * rebase the changes with master. 
 * fix commit message.
 
 .../pve_mobile_resource_filter_sheet.dart     | 40 +++++++------------
 1 file changed, 15 insertions(+), 25 deletions(-)

diff --git a/lib/widgets/pve_mobile_resource_filter_sheet.dart b/lib/widgets/pve_mobile_resource_filter_sheet.dart
index cee3a49..34e169b 100644
--- a/lib/widgets/pve_mobile_resource_filter_sheet.dart
+++ b/lib/widgets/pve_mobile_resource_filter_sheet.dart
@@ -84,34 +84,24 @@ class PveMobileResourceFilterSheet extends StatelessWidget {
               _PveFilterSheetSection(
                 sectionTitle: 'Status',
                 items: [
-                  _ProxmoxResourceFilterListTile(
-                    title: 'Online',
-                    value: state.statusFilter
-                        .contains(PveResourceStatusType.running),
-                    onChanged: (v) => rBloc.events.add(
-                      FilterResources(
-                        statusFilter: _addOrRemove(
-                          v!,
-                          PveResourceStatusType.running,
-                          state.statusFilter,
-                        ),
-                      ),
-                    ),
-                  ),
-                  _ProxmoxResourceFilterListTile(
-                    title: 'Offline',
-                    value: state.statusFilter
-                        .contains(PveResourceStatusType.stopped),
-                    onChanged: (v) => rBloc.events.add(
-                      FilterResources(
-                        statusFilter: _addOrRemove(
-                          v!,
-                          PveResourceStatusType.stopped,
-                          state.statusFilter,
+                  for (var filterItem in [
+                    (title: 'Online', type: PveResourceStatusType.running),
+                    (title: 'Offline', type: PveResourceStatusType.stopped),
+                    (title: 'Paused', type: PveResourceStatusType.paused)
+                  ])
+                    _ProxmoxResourceFilterListTile(
+                      title: filterItem.title,
+                      value: state.statusFilter.contains(filterItem.type),
+                      onChanged: (v) => rBloc.events.add(
+                        FilterResources(
+                          statusFilter: _addOrRemove(
+                            v!,
+                            filterItem.type,
+                            state.statusFilter,
+                          ),
                         ),
                       ),
                     ),
-                  ),
                 ],
               )
             ],
-- 
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 v3 1/1] fix: ui: add missing `paused` status check
  2025-06-05  9:41 [pve-devel] [PATCH proxmox_dart_api_client/pve_flutter_frontend v3 0/2] fix: resources: add filter option for `paused` guest status Shan Shaji
  2025-06-05  9:41 ` [pve-devel] [PATCH pve_flutter_frontend v3 1/1] " Shan Shaji
@ 2025-06-05  9:41 ` Shan Shaji
  2025-07-01 11:55 ` [pve-devel] applied: [PATCH proxmox_dart_api_client/pve_flutter_frontend v3 0/2] fix: resources: add filter option for `paused` guest status Dominik Csapak
  2 siblings, 0 replies; 4+ messages in thread
From: Shan Shaji @ 2025-06-05  9:41 UTC (permalink / raw)
  To: pve-devel

On the resources tab when the guest status was paused,
the guest was showing the status as `unknown`. However on
the overview page the status was shown correctly.

The issue happens due to the `getStatus` function not
returning the corresponding `PveResourceStatusType` when the
status is `paused`. Add the missing status check to fix the issue.

Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---
 
 changes since v2:
 * rebase changes with master. 
 * fix commit message.
 
 lib/src/models/pve_cluster_resources_model.dart | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/src/models/pve_cluster_resources_model.dart b/lib/src/models/pve_cluster_resources_model.dart
index 51ea8fa..a6bd7ee 100644
--- a/lib/src/models/pve_cluster_resources_model.dart
+++ b/lib/src/models/pve_cluster_resources_model.dart
@@ -71,6 +71,8 @@ abstract class PveClusterResourcesModel
 
     if(status == 'prelaunch') return PveResourceStatusType.prelaunch;
 
+    if (status == 'paused') return PveResourceStatusType.paused;
+
     return PveResourceStatusType.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] applied: [PATCH proxmox_dart_api_client/pve_flutter_frontend v3 0/2] fix: resources: add filter option for `paused` guest status
  2025-06-05  9:41 [pve-devel] [PATCH proxmox_dart_api_client/pve_flutter_frontend v3 0/2] fix: resources: add filter option for `paused` guest status Shan Shaji
  2025-06-05  9:41 ` [pve-devel] [PATCH pve_flutter_frontend v3 1/1] " Shan Shaji
  2025-06-05  9:41 ` [pve-devel] [PATCH proxmox_dart_api_client v3 1/1] fix: ui: add missing `paused` status check Shan Shaji
@ 2025-07-01 11:55 ` Dominik Csapak
  2 siblings, 0 replies; 4+ messages in thread
From: Dominik Csapak @ 2025-07-01 11:55 UTC (permalink / raw)
  To: pve-devel

On 6/5/25 11:41, Shan Shaji wrote:
> This patch series adds a new `paused` filter option in the resources
> filter drawer. Additionaly also fixes the `unkown` status shown on the
> guest in the resources tab when the status is `paused`.
> 
> History:
> ========
> 
> v2: https://lore.proxmox.com/pve-devel/664b1efd-7b30-4796-b933-f2071adbd1e8@proxmox.com/T/#t
> 
> changes since v2:
> * fix commit messages.
> * rebase the changes with master.
> 
> pve_flutter_frontend:
> 
> Shan Shaji (1):
>    fix: resources: add filter option for `paused` guest status
> 
>   .../pve_mobile_resource_filter_sheet.dart     | 40 +++++++------------
>   1 file changed, 15 insertions(+), 25 deletions(-)
> 
> 
> proxmox_dart_api_client:
> 
> Shan Shaji (1):
>    fix: ui: add missing `paused` status check
> 
>   lib/src/models/pve_cluster_resources_model.dart | 2 ++
>   1 file changed, 2 insertions(+)
> 
> 
> Summary over all repositories:
>    2 files changed, 17 insertions(+), 25 deletions(-)
> 


applied both patches, 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-07-01 11:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-05  9:41 [pve-devel] [PATCH proxmox_dart_api_client/pve_flutter_frontend v3 0/2] fix: resources: add filter option for `paused` guest status Shan Shaji
2025-06-05  9:41 ` [pve-devel] [PATCH pve_flutter_frontend v3 1/1] " Shan Shaji
2025-06-05  9:41 ` [pve-devel] [PATCH proxmox_dart_api_client v3 1/1] fix: ui: add missing `paused` status check Shan Shaji
2025-07-01 11:55 ` [pve-devel] applied: [PATCH proxmox_dart_api_client/pve_flutter_frontend v3 0/2] fix: resources: add filter option for `paused` guest status Dominik Csapak

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