* [pdm-devel] [PATCH datacenter-manager] api-types/ui/resources: Use more idiomatic 'under maintenance'
@ 2025-10-27 10:02 Christian Ebner
2025-10-27 19:53 ` [pdm-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Christian Ebner @ 2025-10-27 10:02 UTC (permalink / raw)
To: pdm-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pdm-devel] applied: [PATCH datacenter-manager] api-types/ui/resources: Use more idiomatic 'under maintenance'
2025-10-27 10:02 [pdm-devel] [PATCH datacenter-manager] api-types/ui/resources: Use more idiomatic 'under maintenance' Christian Ebner
@ 2025-10-27 19:53 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2025-10-27 19:53 UTC (permalink / raw)
To: pdm-devel, Christian Ebner
On Mon, 27 Oct 2025 11:02:11 +0100, Christian Ebner wrote:
> 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'
>
> [...]
Applied, thanks!
[1/1] api-types/ui/resources: Use more idiomatic 'under maintenance'
commit: 56d13c6a9c52d35f1d470e8f180383adec7637b4
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-27 19:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-27 10:02 [pdm-devel] [PATCH datacenter-manager] api-types/ui/resources: Use more idiomatic 'under maintenance' Christian Ebner
2025-10-27 19:53 ` [pdm-devel] applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox