all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH datacenter-manager] api-types/ui/resources: Use more idiomatic 'under maintenance'
Date: Mon, 27 Oct 2025 11:02:11 +0100	[thread overview]
Message-ID: <20251027100211.61467-1-c.ebner@proxmox.com> (raw)

Currently 'in maintenance' is used when listing and filtering for
datastore having a maintenance mode set. This would be better stated
as 'in maintenance mode', which is however a bit long and unhandy for
the filtering.

Therefore, switch to a better fitting 'under maintenance'

Suggested-by: Lukas Wagner <l.wagner@proxmox.com>
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
 lib/pdm-api-types/src/resource.rs        |  4 ++--
 server/src/api/resources.rs              |  2 +-
 ui/src/dashboard/pbs_datastores_panel.rs | 12 ++++++------
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/lib/pdm-api-types/src/resource.rs b/lib/pdm-api-types/src/resource.rs
index e3c84cf..e09678d 100644
--- a/lib/pdm-api-types/src/resource.rs
+++ b/lib/pdm-api-types/src/resource.rs
@@ -102,7 +102,7 @@ impl Resource {
                 if r.maintenance.is_none() {
                     "online"
                 } else {
-                    "in-maintenance"
+                    "under-maintenance"
                 }
             }
         }
@@ -581,7 +581,7 @@ pub struct PbsDatastoreStatusCount {
     /// Amount of online datastores
     pub online: u64,
     /// Amount of datastores which are in a maintenance mode
-    pub in_maintenance: Option<u64>,
+    pub under_maintenance: Option<u64>,
     /// Amount of datastores which have high datastore usage
     #[serde(skip_serializing_if = "Option::is_none")]
     pub high_usage: Option<u64>,
diff --git a/server/src/api/resources.rs b/server/src/api/resources.rs
index 57563b3..3502c3b 100644
--- a/server/src/api/resources.rs
+++ b/server/src/api/resources.rs
@@ -462,7 +462,7 @@ pub async fn get_status(
                     if r.maintenance.is_none() {
                         counts.pbs_datastores.online += 1;
                     } else {
-                        *counts.pbs_datastores.in_maintenance.get_or_insert_default() += 1;
+                        *counts.pbs_datastores.under_maintenance.get_or_insert_default() += 1;
                     }
                     if r.usage > PBS_DATASTORE_HIGH_USAGE_THRESHOLD {
                         *counts.pbs_datastores.high_usage.get_or_insert_default() += 1;
diff --git a/ui/src/dashboard/pbs_datastores_panel.rs b/ui/src/dashboard/pbs_datastores_panel.rs
index e028476..3e148e6 100644
--- a/ui/src/dashboard/pbs_datastores_panel.rs
+++ b/ui/src/dashboard/pbs_datastores_panel.rs
@@ -39,7 +39,7 @@ impl From<PbsDatastoresPanel> for VNode {
 #[derive(PartialEq, Clone)]
 pub enum StatusRow {
     Online(u64),
-    InMaintenance(u64),
+    UnderMaintenance(u64),
     Removable(u64),
     S3Backend(u64),
     HighUsage(u64),
@@ -74,12 +74,12 @@ impl yew::Component for PbsDatastoresPanelComponent {
 
         let data = vec![
             StatusRow::Online(status.online),
-            StatusRow::InMaintenance(status.in_maintenance.unwrap_or_default()),
+            StatusRow::UnderMaintenance(status.under_maintenance.unwrap_or_default()),
             StatusRow::Removable(status.removable.unwrap_or_default()),
             StatusRow::S3Backend(status.s3_backend.unwrap_or_default()),
             StatusRow::HighUsage(status.high_usage.unwrap_or_default()),
             StatusRow::Unknown(status.unknown.unwrap_or_default()),
-            StatusRow::All(status.online + status.in_maintenance.unwrap_or_default()),
+            StatusRow::All(status.online + status.under_maintenance.unwrap_or_default()),
         ];
 
         let tiles: Vec<_> = data
@@ -115,11 +115,11 @@ fn create_list_tile(
             "High usage",
             Some(("high-usage", "property")),
         ),
-        StatusRow::InMaintenance(count) => (
+        StatusRow::UnderMaintenance(count) => (
             Fa::new("wrench"),
             count,
-            "In Maintenance",
-            Some(("in-maintenance", "status")),
+            "Under Maintenance",
+            Some(("under-maintenance", "status")),
         ),
         StatusRow::Removable(count) => (
             Fa::new("plug"),
-- 
2.47.3



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


             reply	other threads:[~2025-10-27 10:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-27 10:02 Christian Ebner [this message]
2025-10-27 19:53 ` [pdm-devel] applied: " Thomas Lamprecht

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=20251027100211.61467-1-c.ebner@proxmox.com \
    --to=c.ebner@proxmox.com \
    --cc=pdm-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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal