public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Jakob-Tobias Winter <tobias@stuttgart.de>
To: pbs-devel@lists.proxmox.com
Cc: Jakob-Tobias Winter <tobias@stuttgart.de>
Subject: [RFC PATCH proxmox-backup 06/12] ui: tape backup job: add attribute filter
Date: Fri, 13 Nov 2026 09:56:33 +0100	[thread overview]
Message-ID: <20261113085637.57360-9-tobias@stuttgart.de> (raw)
In-Reply-To: <20261113085637.57360-3-tobias@stuttgart.de>

Allow editing the attribute filter of a job in its group filter tab,
as a list of filters in a text field, and show it in the job
overview next to the group filter.

The group filter and the attribute filter can both ask for their
option to be removed when a job is saved. Collect these requests,
instead of letting the group filter overwrite the other ones.

Signed-off-by: Jakob-Tobias Winter <tobias@stuttgart.de>
---
 www/tape/BackupJobs.js           |  7 +++++++
 www/tape/window/TapeBackupJob.js | 27 ++++++++++++++++++++++++++-
 2 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/www/tape/BackupJobs.js b/www/tape/BackupJobs.js
index 68d808af5..fb79685c7 100644
--- a/www/tape/BackupJobs.js
+++ b/www/tape/BackupJobs.js
@@ -9,6 +9,7 @@ Ext.define('pbs-tape-backup-job-status', {
         'schedule',
         'comment',
         'group-filter',
+        'attribute-filter',
         { name: 'eject-media', type: 'boolean' },
         { name: 'export-media-set', type: 'boolean' },
         { name: 'latest-only', type: 'boolean' },
@@ -252,6 +253,12 @@ Ext.define('PBS.config.TapeBackupJobView', {
             renderer: (v) => (v ? Ext.String.htmlEncode(v) : gettext('All')),
             width: 80,
         },
+        {
+            header: gettext('Attribute Filter'),
+            dataIndex: 'attribute-filter',
+            renderer: (v) => (v ? Ext.String.htmlEncode(v) : gettext('All')),
+            width: 80,
+        },
         {
             header: gettext('Schedule'),
             dataIndex: 'schedule',
diff --git a/www/tape/window/TapeBackupJob.js b/www/tape/window/TapeBackupJob.js
index ad03b6076..83fd736a1 100644
--- a/www/tape/window/TapeBackupJob.js
+++ b/www/tape/window/TapeBackupJob.js
@@ -200,7 +200,7 @@ Ext.define('PBS.TapeManagement.BackupJobEdit', {
                         values['group-filter'].length === 0
                     ) {
                         delete values['group-filter'];
-                        values.delete = 'group-filter';
+                        Proxmox.Utils.assemble_field_data(values, { delete: 'group-filter' });
                     }
                     if (this.isCreate) {
                         delete values.delete;
@@ -216,6 +216,31 @@ Ext.define('PBS.TapeManagement.BackupJobEdit', {
                         xtype: 'pbsGroupFilter',
                         name: 'group-filter',
                     },
+                    {
+                        xtype: 'proxmoxtextfield',
+                        name: 'attribute-filter',
+                        fieldLabel: gettext('Attribute Filter'),
+                        emptyText: gettext('All'),
+                        anchor: '100%',
+                        margin: '10 0 0 0',
+                        autoEl: {
+                            tag: 'div',
+                            'data-qtip': gettext(
+                                "Select groups by 'KEY=VALUE', skip them with 'exclude:KEY=VALUE'.",
+                            ),
+                        },
+                        cbind: {
+                            deleteEmpty: '{!isCreate}',
+                        },
+                        valueToRaw: (value) =>
+                            Ext.isArray(value) ? value.join(', ') : (value ?? ''),
+                        getSubmitValue: function () {
+                            let filters = this.getRawValue()
+                                .split(/[\s,;]+/)
+                                .filter((filter) => filter !== '');
+                            return filters.length > 0 ? filters : null;
+                        },
+                    },
                 ],
             },
             {
-- 
2.53.0




  parent reply	other threads:[~2026-11-13  9:07 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13  8:56 [RFC PATCH many 00/12] snapshot attributes for tags and pools of PVE guests, tape job filter Jakob-Tobias Winter
2026-11-13  8:56 ` [RFC PATCH proxmox 01/12] pbs-api-types: add types and schemas for snapshot attributes Jakob-Tobias Winter
2026-11-16 14:57   ` Christian Ebner
2026-11-18 12:54   ` Samuel Rufinatscha
2026-11-13  8:56 ` [RFC PATCH proxmox 02/12] pbs-api-types: tape: add attribute filter to backup jobs Jakob-Tobias Winter
2026-11-16 14:57   ` Christian Ebner
2026-11-13  8:56 ` [RFC PATCH proxmox-backup 03/12] datastore: add attributes to backup snapshots Jakob-Tobias Winter
2026-11-16 14:57   ` Christian Ebner
2026-11-18 12:55   ` Samuel Rufinatscha
2026-11-13  8:56 ` [RFC PATCH proxmox-backup 04/12] fix #7452: api: datastore: add endpoints for snapshot attributes Jakob-Tobias Winter
2026-11-16 14:57   ` Christian Ebner
2026-11-13  8:56 ` [RFC PATCH proxmox-backup 05/12] tape: backup job: allow selecting groups by " Jakob-Tobias Winter
2026-11-18 13:06   ` Samuel Rufinatscha
2026-11-18 15:19     ` Christian Ebner
2026-11-13  8:56 ` Jakob-Tobias Winter [this message]
2026-11-13  8:56 ` [RFC PATCH proxmox-backup 07/12] docs: describe snapshot attributes and the tape job attribute filter Jakob-Tobias Winter
2026-11-13  8:56 ` [RFC PATCH storage 08/12] pbs: add helper to set the attributes of a backup snapshot Jakob-Tobias Winter
2026-11-13  8:56 ` [RFC PATCH guest-common 09/12] vzdump: add pbs-snapshot-attributes option Jakob-Tobias Winter
2026-11-13  8:56 ` [RFC PATCH manager 10/12] vzdump: store guest tags and pool as snapshot attributes on PBS Jakob-Tobias Winter
2026-11-13  8:56 ` [RFC PATCH manager 11/12] ui: backup job: add selector for PBS snapshot attributes Jakob-Tobias Winter
2026-11-13  8:56 ` [RFC PATCH docs 12/12] vzdump: describe snapshot attributes on Proxmox Backup Server Jakob-Tobias Winter
2026-11-16 14:57 ` [RFC PATCH many 00/12] snapshot attributes for tags and pools of PVE guests, tape job filter Christian Ebner
2026-11-18 13:07   ` Samuel Rufinatscha
2026-11-18 14:22 ` Samuel Rufinatscha
2026-11-19 11:58   ` Jakob-Tobias Winter

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=20261113085637.57360-9-tobias@stuttgart.de \
    --to=tobias@stuttgart.de \
    --cc=pbs-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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal