From: Michal Fox <me@dualfroz.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH manager] fix #8098: ui: ceph: osd: sort by name naturally
Date: Tue, 6 Oct 2026 07:20:22 +0000 [thread overview]
Message-ID: <20261006072022.7-1-me@dualfroz.com> (raw)
Sorting the OSD tree by the name column compared the names as plain
strings, so 'osd.10' and 'osd.11' ended up before 'osd.8' and 'osd.9',
and the same happened for host names like 'pve10' and 'pve2'.
Add a sorter to the name column that compares numbers in the names by
their value, like it is already done for the storage content view.
Signed-off-by: Michal Fox <me@dualfroz.com>
---
Tested in the browser with the OSD panel and a mocked API response,
including that the sort order still gets restored from the saved state.
www/manager6/ceph/OSD.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/www/manager6/ceph/OSD.js b/www/manager6/ceph/OSD.js
index e7e91eba..b83ddb20 100644
--- a/www/manager6/ceph/OSD.js
+++ b/www/manager6/ceph/OSD.js
@@ -1202,6 +1202,7 @@ Ext.define('PVE.node.CephOsdTree', {
text: 'Name',
dataIndex: 'name',
width: 150,
+ sorter: (a, b) => a.data.name.localeCompare(b.data.name, undefined, { numeric: true }),
},
{
text: 'Type',
--
2.43.0
reply other threads:[~2026-10-06 7:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261006072022.7-1-me@dualfroz.com \
--to=me@dualfroz.com \
--cc=pve-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox