From: Michal Fox <me@dualfroz.com>
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 [thread overview]
Message-ID: <20261004173553.7-1-me@dualfroz.com> (raw)
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 <me@dualfroz.com>
---
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 `<i class="fa fa-adjust warning"></i> ${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
reply other threads:[~2026-10-04 17:36 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=20261004173553.7-1-me@dualfroz.com \
--to=me@dualfroz.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox