From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id C06491FF0AA for ; Tue, 06 Oct 2026 09:20:56 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 317792139E; Tue, 06 Oct 2026 09:20:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dualfroz.com; s=dkim; t=1791271225; h=from:subject:date:message-id:to:mime-version: content-transfer-encoding; bh=mBiFEh0rLaLp2YNBiFobwsp0FvVx999WPmOpN27tk14=; b=snIfBFScjscWAsBkDYdkdSCVZM2xeTDT2Fn6MlQmZUKotupxJGyT3lsj0Y5mYf+Tvv+OCn X9QTk0HXZlZ4gg5lttlVBLiWi2g4m7K5H2a+lWMh23RYPh4VY7rNggjN0y5Ncz8LLuAWpV Mm6hvyH+UXhqJIoztKcSoyxESaPk/j3YVgK/uQAr97+BXGS0RCJaBnAs1NGSesopvwxJv+ KQ8ke3oJ53pHwCadjPCOMWdvgB/BOjXzX9fXq7apB76DDwRki7GNi32gihii/PCn9niFAA YBuY4+GTK2e/EfZJL9stJxDuqWgROFV2viweRu80E+5EqN6ZNRykIwFqCZpAhw== From: Michal Fox 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 Message-ID: <20261006072022.7-1-me@dualfroz.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.159 Adjusted score from AWL reputation of From: address DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain DMARC_PASS -0.1 DMARC pass policy SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: WMV5BUUW5GVGTDJXI6U22BLRFV6XM2EP X-Message-ID-Hash: WMV5BUUW5GVGTDJXI6U22BLRFV6XM2EP X-MailFrom: me@dualfroz.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- 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