all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Kefu Chai <k.chai@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH manager] fix #8098: ui: ceph: osd: sort OSDs naturally by name
Date: Fri,  9 Oct 2026 08:43:53 +0800	[thread overview]
Message-ID: <20261009004353.3324350-1-k.chai@proxmox.com> (raw)

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





                 reply	other threads:[~2026-10-09  0:44 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=20261009004353.3324350-1-k.chai@proxmox.com \
    --to=k.chai@proxmox.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 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