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 6B3671FF09F for ; Tue, 01 Dec 2026 15:55:24 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 0633320A63; Tue, 01 Dec 2026 15:55:24 +0100 (CET) From: Shan Shaji To: pdm-devel@lists.proxmox.com Subject: [PATCH datacenter-manager] fix: ui: set sort function for datastore comment column Date: Tue, 1 Dec 2026 15:55:09 +0100 Message-ID: <20261201145509.114370-1-s.shaji@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: 1796136919473 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.342 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: VK7RPF2UV4MTM4SHML4CT337622FDPON X-Message-ID-Hash: VK7RPF2UV4MTM4SHML4CT337622FDPON X-MailFrom: s.shaji@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 X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The datastore content view does not support sorting the tree by the comment column, unlike PBS. Set a sorter callback to fix it. Signed-off-by: Shan Shaji --- I'm not sure if disabling sorting by comments was intentional. If it was, feel free to ignore this. ui/src/pbs/snapshot_list.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/src/pbs/snapshot_list.rs b/ui/src/pbs/snapshot_list.rs index eccca26c..dfd1589a 100644 --- a/ui/src/pbs/snapshot_list.rs +++ b/ui/src/pbs/snapshot_list.rs @@ -401,6 +401,9 @@ impl SnapshotListComp { .into(), DataTableColumn::new(tr!("Comment")) .width("minmax(140px, 1fr)") + .sorter(|a: &SnapshotTreeEntry, b: &SnapshotTreeEntry| { + sort_key(a, a.comment()).cmp(&sort_key(b, b.comment())) + }) .render_cell(render_comment) .into(), DataTableColumn::new(tr!("Backup Time")) -- 2.47.3