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 0608A1FF0AD for ; Sun, 04 Oct 2026 19:36:03 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 77C2421462; Sun, 04 Oct 2026 19:36:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dualfroz.com; s=dkim; t=1791135356; h=from:subject:date:message-id:to:mime-version: content-transfer-encoding; bh=7QzOtievY4SLxfZ21ymbnQPdAypHuRn3NaaCoG3BM4o=; b=fulZf314I1qRcfGk1Mf5AXjdENK22Jmhr/MvHsHQm385OK8GIaAGI8Fa3rC7JPMWUZ3K2u wrd7oZyRUlT6g3YHGfutNtA1gKAiM7qA90L+iz9b2wi3S+RMcsUI0aXitujDJHaMCtx6yg Wyi+re/bmVYwGFlWfDBGrd7wQe5vbX22lsLpKWPV8UskYujCxwpFnTty91Tq1TFEYiyPzB /y8SYZiNrYpgdh1Jx2fSx53w/I60fIyfexqioVHXDkzwdrHwIGSNcD2yt9BbR8Q3jjcLta gDvdRs1iNWaP6YMMhMYFdssT+bbm+1xv1Aj8JudIjMXAJ5so1xU4B27I9ZSItg== From: Michal Fox To: pve-devel@lists.proxmox.com Subject: [PATCH manager] fix #7684: ui: backup job detail: allow sorting guests by inclusion status Date: Sun, 4 Oct 2026 17:35:53 +0000 Message-ID: <20261004173553.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.162 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: WGKRQQE7D5Z5HLFGW5JSWZTZ7ARM5RBM X-Message-ID-Hash: WGKRQQE7D5Z5HLFGW5JSWZTZ7ARM5RBM 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: The 'Backup Job' column of the job detail tree only has a value for the volumes, not for the guests. So sorting by it only sorted the volumes within each guest, while the guests themselves stayed in their order, which made it look like sorting by that column did nothing. Set the share of included volumes on the guests too, and show it as 'Yes' if all, 'No' if none and 'Mixed' if only some of the volumes of a guest are included. This way, guests with excluded volumes end up at the top or bottom of the list when sorting by that column. Signed-off-by: Michal Fox --- Tested in the browser with the job detail tree and a mocked API response: sorting by the column now orders the guests by No, Mixed and Yes and back, and the volumes are still sorted within each guest. www/manager6/dc/BackupJobDetail.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/www/manager6/dc/BackupJobDetail.js b/www/manager6/dc/BackupJobDetail.js index bdd39385..859064ae 100644 --- a/www/manager6/dc/BackupJobDetail.js +++ b/www/manager6/dc/BackupJobDetail.js @@ -50,7 +50,13 @@ Ext.define('PVE.dc.BackupDiskTree', { }, { text: gettext('Backup Job'), - renderer: PVE.Utils.render_backup_status, + renderer: function (value, meta, record) { + if (value > 0 && value < 1) { + // guest level with only some of its volumes included + return ` ${gettext('Mixed')}`; + } + return PVE.Utils.render_backup_status(value, meta, record); + }, dataIndex: 'included', flex: 3, }, @@ -68,8 +74,16 @@ Ext.define('PVE.dc.BackupDiskTree', { Proxmox.Utils.setErrorMask(me, response.htmlStatus); }, success: function (response, opts) { + let root = response.result.data; + // set the share of included volumes on the guests too, so they can be sorted by it + for (const guest of root.children) { + if (guest.children?.length) { + let included = guest.children.filter((volume) => volume.included).length; + guest.included = included / guest.children.length; + } + } sm.deselectAll(); - me.setRootNode(response.result.data); + me.setRootNode(root); me.expandAll(); }, }); -- 2.43.0