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 9BE7D1FF0AF for ; Fri, 06 Nov 2026 18:24:17 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id E46B3217EF; Fri, 06 Nov 2026 18:23:30 +0100 (CET) From: Christian Ebner To: pbs-devel@lists.proxmox.com Subject: [PATCH proxmox-backup v2 33/43] ui: add retention timespan form and use it for sync job edit window Date: Fri, 6 Nov 2026 18:22:25 +0100 Message-ID: <20261106172235.890542-34-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261106172235.890542-1-c.ebner@proxmox.com> References: <20261106172235.890542-1-c.ebner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1793985779705 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.456 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust 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: LZRDTIHUYH4QZHA2NKPSQ6I6EXXGS3VY X-Message-ID-Hash: LZRDTIHUYH4QZHA2NKPSQ6I6EXXGS3VY X-MailFrom: c.ebner@proxmox.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 Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Based on the calender event form, the retention timespan form provides some useful template values for snapshot retention to be set on sync jobs. Signed-off-by: Christian Ebner --- www/Makefile | 1 + www/form/RetentionTimespan.js | 22 ++++++++++++++++++++++ www/window/SyncJobEdit.js | 9 +++++++++ 3 files changed, 32 insertions(+) create mode 100644 www/form/RetentionTimespan.js diff --git a/www/Makefile b/www/Makefile index a27bf754a..fdbf75a17 100644 --- a/www/Makefile +++ b/www/Makefile @@ -56,6 +56,7 @@ JSSRC= \ form/GroupFilter.js \ form/VerifyOutdatedAfter.js \ form/EncryptionKeySelector.js \ + form/RetentionTimespan.js \ data/RunningTasksStore.js \ button/TaskButton.js \ panel/PrunePanel.js \ diff --git a/www/form/RetentionTimespan.js b/www/form/RetentionTimespan.js new file mode 100644 index 000000000..a14b68cbb --- /dev/null +++ b/www/form/RetentionTimespan.js @@ -0,0 +1,22 @@ +Ext.define('PBS.data.RetentionTimespanTemplates', { + extend: 'Ext.data.Store', + alias: 'store.retentionTimespanTemplates', + + field: ['value', 'text'], + data: [ + { value: '1 day', text: Ext.String.format(gettext('{0} day'), 1) }, + { value: '4 weeks', text: Ext.String.format(gettext('{0} weeks'), 4) }, + { value: '1 month', text: Ext.String.format(gettext('{0} month'), 1) }, + { value: '1 year', text: Ext.String.format(gettext('{0} year'), 1) }, + { value: '', text: gettext('custom') }, + ], +}); + +Ext.define('PBS.form.RetentionTimespan', { + extend: 'PBS.form.CalendarEvent', + alias: 'widget.pbsRetentionTimespan', + + store: { + type: 'retentionTimespanTemplates', + }, +}); diff --git a/www/window/SyncJobEdit.js b/www/window/SyncJobEdit.js index 961ce2951..df14f2f56 100644 --- a/www/window/SyncJobEdit.js +++ b/www/window/SyncJobEdit.js @@ -231,6 +231,15 @@ Ext.define('PBS.window.SyncJobEdit', { // NOTE: handle deleteEmpty in onGetValues due to bandwidth field having a cbind too, // further hide rate limit field depending on sync direction in controller init. }, + { + xtype: 'pbsRetentionTimespan', + name: 'retention-timespan', + fieldLabel: gettext('Retention Timespan'), + emptyText: gettext('None'), + cbind: { + deleteEmpty: '{!isCreate}', + }, + }, ], column2: [ -- 2.47.3