all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [PATCH ui 1/1] ui: ceph pools: allow sorting by used percentage
Date: Tue, 26 May 2026 16:48:44 +0200	[thread overview]
Message-ID: <20260526144845.428632-1-s.hanreich@proxmox.com> (raw)

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





             reply	other threads:[~2026-05-26 14:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-26 14:48 Stefan Hanreich [this message]
2026-05-26 15:01 ` applied: [PATCH ui 1/1] ui: ceph pools: allow sorting by used percentage 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=20260526144845.428632-1-s.hanreich@proxmox.com \
    --to=s.hanreich@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