From: POYEN Alexis <alexis.poyen@groupe-cyllene.com>
To: pve-devel@lists.proxmox.com
Cc: POYEN Alexis <alexis.poyen@groupe-cyllene.com>
Subject: [RFC PATCH manager 3/3] close #4186: ui: backup: add tag based selection mode
Date: Thu, 3 Dec 2026 10:27:10 +0100 [thread overview]
Message-ID: <20261203092717.1863218-5-alexis.poyen@groupe-cyllene.com> (raw)
In-Reply-To: <20261203092717.1863218-1-alexis.poyen@groupe-cyllene.com>
Add a 'Tag based' mode to the backup job edit window, with a tag field
to select the guests to back up. Show the tags of a job in the backup
job list.
Signed-off-by: POYEN Alexis <alexis.poyen@groupe-cyllene.com>
---
www/manager6/Utils.js | 4 ++++
www/manager6/dc/Backup.js | 21 +++++++++++++++++++++
2 files changed, 25 insertions(+)
diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index fc3667f5..a6e401de 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -425,6 +425,10 @@ Ext.define('PVE.Utils', {
return "Pool '" + record.data.pool + "'";
}
+ if (record.data.tags) {
+ return gettext('Tags') + ": " + record.data.tags;
+ }
+
return '-';
},
diff --git a/www/manager6/dc/Backup.js b/www/manager6/dc/Backup.js
index d3db9d9c..fbb5fa4a 100644
--- a/www/manager6/dc/Backup.js
+++ b/www/manager6/dc/Backup.js
@@ -50,11 +50,16 @@ Ext.define('PVE.dc.BackupEdit', {
delete values.vmid;
} else if (selMode === 'pool') {
delete values.vmid;
+ } else if (selMode === 'tag') {
+ delete values.vmid;
}
if (selMode !== 'pool') {
delete values.pool;
}
+ if (selMode !== 'tag') {
+ delete values.tags;
+ }
return values;
},
@@ -181,6 +186,8 @@ Ext.define('PVE.dc.BackupEdit', {
} else if (data.pool) {
data.selMode = 'pool';
data.selPool = data.pool;
+ } else if (data.tags) {
+ data.selMode = 'tag';
} else {
data.selMode = 'include';
}
@@ -276,6 +283,7 @@ Ext.define('PVE.dc.BackupEdit', {
formulas: {
poolMode: (get) => get('selMode') === 'pool',
+ tagMode: (get) => get('selMode') === 'tag',
disableVMSelection: (get) =>
get('selMode') !== 'include' && get('selMode') !== 'exclude',
selectionLabel: function (get) {
@@ -340,6 +348,7 @@ Ext.define('PVE.dc.BackupEdit', {
['all', gettext('All')],
['exclude', gettext('Exclude selected VMs')],
['pool', gettext('Pool based')],
+ ['tag', gettext('Tag based')],
],
fieldLabel: gettext('Selection mode'),
name: 'selMode',
@@ -351,6 +360,17 @@ Ext.define('PVE.dc.BackupEdit', {
change: 'modeChange',
},
},
+ {
+ xtype: 'pveTagFieldSet',
+ reference: 'tagSelector',
+ title: gettext('Tags to backup'),
+ name: 'tags',
+ hidden: true,
+ bind: {
+ hidden: '{!tagMode}',
+ disabled: '{!tagMode}',
+ },
+ },
{
xtype: 'pvePoolSelector',
reference: 'poolSelector',
@@ -971,6 +991,7 @@ Ext.define(
'prune-backups',
'starttime',
'storage',
+ 'tags',
'vmid',
{ name: 'enabled', type: 'boolean' },
{ name: 'all', type: 'boolean' },
--
2.53.0
prev parent reply other threads:[~2026-12-03 9:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 9:27 [RFC PATCH guest-common/manager 0/4] vzdump: support tag based guest selection in backup jobs POYEN Alexis
2026-12-03 9:27 ` [RFC PATCH guest-common 1/1] close #4186: vzdump: add 'tags' option to select guests by tag POYEN Alexis
2026-12-03 9:27 ` [RFC PATCH manager 1/3] close #4186: vzdump: " POYEN Alexis
2026-12-03 9:27 ` [RFC PATCH manager 2/3] close #4186: api: backup: support tag based guest selection in jobs POYEN Alexis
2026-12-03 9:27 ` POYEN Alexis [this message]
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=20261203092717.1863218-5-alexis.poyen@groupe-cyllene.com \
--to=alexis.poyen@groupe-cyllene.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