From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id C6BDF1FF0A7 for ; Tue, 18 Aug 2026 10:31:28 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 938262155E; Tue, 18 Aug 2026 10:31:26 +0200 (CEST) From: Elias Huhsovitz To: pve-devel@lists.proxmox.com Subject: [PATCH manager 0/2] fix #7136: ui: tree: harmonize folder view resource ordering Date: Tue, 18 Aug 2026 10:31:08 +0200 Message-ID: <20260818083110.15786-1-e.huhsovitz@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1787041860660 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.778 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust 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: 7PLJ7YVNUXUYMYMYDAIWAQ45MJBMVZMD X-Message-ID-Hash: 7PLJ7YVNUXUYMYMYDAIWAQ45MJBMVZMD X-MailFrom: e.huhsovitz@proxmox.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 CC: Elias Huhsovitz X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This patch series fixes bug #7136, where resources in the Folder View were ordered lexicographically instead of following the order defined by the `getTypeOrder` function. It also includes a follow-up cleanup to align variable declarations with modern javascript standards. Previously, grouping nodes in the Folder View were assigned the literal type 'type' instead of their actual resource type, such as 'node' or 'network'. This caused `getTypeOrder` to return a default value for all groups, resulting in a lexicographical sorting fallback. Other views, such as Server View, pass the correct types to `getTypeOrder`. Patch 1/2 fixes the root cause by setting the grouping node's type to the actual resource type when grouping by 'type'. This restores the correct sort order (LXC, QEMU, Node, SDN, Network, Storage) and allows icon and text resolution via typeDefaults. Patch 2/2 replaces let with const for variables that are never reassigned. This aligns the with modern JavaScript best practices. Elias Huhsovitz (2): fix #7136: ui: tree: harmonize folder view resource ordering ui: tree: reduce reduce usage of `let` keyword www/manager6/tree/ResourceTree.js | 148 ++++++++++++++++-------------- 1 file changed, 77 insertions(+), 71 deletions(-) -- 2.47.3