[pdm-devel] [RFC datacenter-manager 4/5] ui: dashboard: show datastores with upwards trend in stats panel
Shannon Sterz
s.sterz at proxmox.com
Wed Oct 29 11:20:51 CET 2025
On Mon Oct 27, 2025 at 3:25 PM CET, Christian Ebner wrote:
> Shows and allow to filter for datastores which have an upwards trend
> which would lead to the datastore being full shortly.
>
> Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
> ---
> ui/src/dashboard/pbs_datastores_panel.rs | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/ui/src/dashboard/pbs_datastores_panel.rs b/ui/src/dashboard/pbs_datastores_panel.rs
> index 4cfc0c8..ece918d 100644
> --- a/ui/src/dashboard/pbs_datastores_panel.rs
> +++ b/ui/src/dashboard/pbs_datastores_panel.rs
> @@ -4,7 +4,7 @@ use pdm_api_types::resource::{PbsDatastoreStatusCount, ResourceType};
> use pdm_search::{Search, SearchTerm};
> use proxmox_yew_comp::Status;
> use pwt::{
> - css::{self, TextAlign},
> + css::{self, FontColor, TextAlign},
> prelude::*,
> widget::{Container, Fa, List, ListTile},
> };
> @@ -43,6 +43,7 @@ pub enum StatusRow {
> Removable(u64),
> S3Backend(u64),
> CriticalUsage(u64),
> + UptrendingUsage(u64),
> Unknown(u64),
> All(u64),
> }
> @@ -78,6 +79,7 @@ impl yew::Component for PbsDatastoresPanelComponent {
> StatusRow::Removable(status.removable.unwrap_or_default()),
> StatusRow::S3Backend(status.s3_backend.unwrap_or_default()),
> StatusRow::CriticalUsage(status.critical_usage.unwrap_or_default()),
> + StatusRow::UptrendingUsage(status.uptrending_usage.unwrap_or_default()),
> StatusRow::Unknown(status.unknown.unwrap_or_default()),
> StatusRow::All(status.online + status.in_maintenance.unwrap_or_default()),
> ];
> @@ -115,6 +117,12 @@ fn create_list_tile(
> "Critical Usage",
> Some(("critical-usage", "property")),
> ),
> + StatusRow::UptrendingUsage(count) => (
> + Fa::new("arrow-up").class(FontColor::Warning),
> + count,
> + "Uptrendig Usage",
i know this is pre-existing here, but this would benefit from being
translate-able imo. so would quite a few others here in this list (e.g.
"Critical Usage", "In Maintenance" etc). so consider making this
tr!("Uptrendig Usage")
> + Some(("uptrending-usage", "property")),
> + ),
> StatusRow::InMaintenance(count) => (
> Fa::new("wrench"),
> count,
More information about the pdm-devel
mailing list