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 7CEF81FF0B7 for ; Fri, 13 Nov 2026 10:07:03 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 061882184D; Fri, 13 Nov 2026 10:06:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stuttgart.de; s=s1022; t=1794560286; bh=KSTr7QKQZGcLEgUeh3jUdz1UuhpU8fDG42pXgLXqjd0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=w0fGcCgsruFFMMA3Ri1dXGd8kIKoB11YW+SY46eYw/dxT0X7dlIayL5BD8ORrbbmK Fc44xLRe23E+ELMWAT5W/wyXncMrcBZHZyWSkxaOIfmseHSsTnuSVaPJsfXdZVtS+1 1sts0ewbFYX5w5nULfmdDzyGpd7pcMVoK3bwMinpjq3rUxp0/irDBm9wqbAcIzcvu7 uLolTV5lVuzImwgIezCitC2RRRh1knYdPmVVqQuPeta42R1pEpjw0phDBFWNI9/2ws L6tHOENLKg+z8DoB0b003u03ercibE9XuaaeOCrEKjjxeK/C+l/0lY8axWYNqrpuMi 98HFJ95dlQzFg== From: Jakob-Tobias Winter To: pbs-devel@lists.proxmox.com Subject: [RFC PATCH proxmox-backup 06/12] ui: tape backup job: add attribute filter Date: Fri, 13 Nov 2026 09:56:33 +0100 Message-ID: <20261113085637.57360-9-tobias@stuttgart.de> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261113085637.57360-3-tobias@stuttgart.de> References: <20261113085637.57360-3-tobias@stuttgart.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.024 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 RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_PASS -0.001 SPF: HELO matches SPF record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 6WFDLLUAOAOTRI5UNI4DHYZGFH7UZSAX X-Message-ID-Hash: 6WFDLLUAOAOTRI5UNI4DHYZGFH7UZSAX X-MailFrom: prvs=d19b210678=tobias@stuttgart.de 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 CC: Jakob-Tobias Winter X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- 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