public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH manager] fix #8098: ui: ceph: osd: sort OSDs naturally by name
@ 2026-10-09  0:43 Kefu Chai
  2026-10-12 16:38 ` applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Kefu Chai @ 2026-10-09  0:43 UTC (permalink / raw)
  To: pve-devel

Sorting the OSD tree by its Name column compared plain strings, so
osd.10 came before osd.8. The tree saves its sort state, so the wrong
order also survived reloads.

Compare names with localeCompare's numeric option, as
storage/ContentView.js already does. OSDs now sort by ID, and hosts
like pve2 and pve10 sort by number as well.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
---
 www/manager6/ceph/OSD.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/www/manager6/ceph/OSD.js b/www/manager6/ceph/OSD.js
index e7e91eba..4c2face6 100644
--- a/www/manager6/ceph/OSD.js
+++ b/www/manager6/ceph/OSD.js
@@ -1202,6 +1202,10 @@ Ext.define('PVE.node.CephOsdTree', {
             text: 'Name',
             dataIndex: 'name',
             width: 150,
+            sorter: {
+                sorterFn: (a, b) =>
+                    a.data.name.localeCompare(b.data.name, undefined, { numeric: true }),
+            },
         },
         {
             text: 'Type',
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* applied: [PATCH manager] fix #8098: ui: ceph: osd: sort OSDs naturally by name
  2026-10-09  0:43 [PATCH manager] fix #8098: ui: ceph: osd: sort OSDs naturally by name Kefu Chai
@ 2026-10-12 16:38 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2026-10-12 16:38 UTC (permalink / raw)
  To: pve-devel, Kefu Chai

On Fri, 09 Oct 2026 08:43:53 +0800, Kefu Chai wrote:
> Sorting the OSD tree by its Name column compared plain strings, so
> osd.10 came before osd.8. The tree saves its sort state, so the wrong
> order also survived reloads.
> 
> Compare names with localeCompare's numeric option, as
> storage/ContentView.js already does. OSDs now sort by ID, and hosts
> like pve2 and pve10 sort by number as well.
> 
> [...]

Applied, thanks!

[1/1] fix #8098: ui: ceph: osd: sort OSDs naturally by name
      https://git.proxmox.com/?p=pve-manager.git;a=commitdiff;h=9c3f5e5258f73f31e273493232a79d615fd9e072




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-12 16:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-09  0:43 [PATCH manager] fix #8098: ui: ceph: osd: sort OSDs naturally by name Kefu Chai
2026-10-12 16:38 ` 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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal