public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH manager] fix #8098: ui: ceph: osd: sort by name naturally
@ 2026-10-06  7:20 Michal Fox
  0 siblings, 0 replies; only message in thread
From: Michal Fox @ 2026-10-06  7:20 UTC (permalink / raw)
  To: pve-devel

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




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-06  7:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-06  7:20 [PATCH manager] fix #8098: ui: ceph: osd: sort by name naturally Michal Fox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal