* [PATCH ui 1/1] ui: ceph pools: allow sorting by used percentage
@ 2026-05-26 14:48 Stefan Hanreich
2026-05-26 15:01 ` applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Hanreich @ 2026-05-26 14:48 UTC (permalink / raw)
To: pdm-devel
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
ui/src/ceph/pools.rs | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ui/src/ceph/pools.rs b/ui/src/ceph/pools.rs
index 03beac45..35ed8b4a 100644
--- a/ui/src/ceph/pools.rs
+++ b/ui/src/ceph/pools.rs
@@ -145,6 +145,11 @@ fn columns() -> Rc<Vec<DataTableHeader<CephPool>>> {
.into(),
DataTableColumn::new(tr!("Used"))
.flex(1)
+ .sorter(|a: &CephPool, b: &CephPool| {
+ a.percent_used
+ .unwrap_or_default()
+ .total_cmp(&b.percent_used.unwrap_or_default())
+ })
.render(|p: &CephPool| {
let pct = p.percent_used.unwrap_or(0.0) * 100.0;
let used = HumanByte::from(p.bytes_used.unwrap_or(0).max(0) as u64);
--
2.47.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-26 15:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-26 14:48 [PATCH ui 1/1] ui: ceph pools: allow sorting by used percentage Stefan Hanreich
2026-05-26 15:01 ` 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