From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 07A2F1FF0AF for ; Fri, 06 Nov 2026 18:24:20 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 88B81216E3; Fri, 06 Nov 2026 18:23:31 +0100 (CET) From: Christian Ebner To: pbs-devel@lists.proxmox.com Subject: [PATCH proxmox-backup v2 34/43] ui: allow datastore wide max retention timespan configuration Date: Fri, 6 Nov 2026 18:22:26 +0100 Message-ID: <20261106172235.890542-35-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: 1793985779944 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.455 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: BRDMEE7BBEIXM3JQILC37AHAWMHP2S3N X-Message-ID-Hash: BRDMEE7BBEIXM3JQILC37AHAWMHP2S3N 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: Expose the datastore config property in the UI for ease of adaption. Signed-off-by: Christian Ebner --- www/Makefile | 1 + www/datastore/OptionView.js | 8 ++++++++ www/window/MaxRetentionTimespanEdit.js | 25 +++++++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 www/window/MaxRetentionTimespanEdit.js diff --git a/www/Makefile b/www/Makefile index fdbf75a17..38f9f3f37 100644 --- a/www/Makefile +++ b/www/Makefile @@ -91,6 +91,7 @@ JSSRC= \ window/RemoteEdit.js \ window/TrafficControlEdit.js \ window/ThresholdResetScheduleEdit.js \ + window/MaxRetentionTimespanEdit.js \ window/NotifyOptions.js \ window/SyncJobEdit.js \ window/PruneJobEdit.js \ diff --git a/www/datastore/OptionView.js b/www/datastore/OptionView.js index bf04fbb89..cf23063d4 100644 --- a/www/datastore/OptionView.js +++ b/www/datastore/OptionView.js @@ -392,5 +392,13 @@ Ext.define('PBS.Datastore.Options', { xtype: 'pbsMaxSnapshotTimeSkewEdit', }, }, + 'max-retention-timespan': { + required: true, + header: gettext('Maximum Retention'), + renderer: (timespan) => timespan ?? gettext('None'), + editor: { + xtype: 'pbsMaxRetentionTimespanEdit', + }, + }, }, }); diff --git a/www/window/MaxRetentionTimespanEdit.js b/www/window/MaxRetentionTimespanEdit.js new file mode 100644 index 000000000..c64dc86d4 --- /dev/null +++ b/www/window/MaxRetentionTimespanEdit.js @@ -0,0 +1,25 @@ +Ext.define('PBS.window.MaxRetentionTimespanEdit', { + extend: 'Proxmox.window.Edit', + alias: 'widget.pbsMaxRetentionTimespanEdit', + mixins: ['Proxmox.Mixin.CBind'], + + subject: gettext('Maximum Retention Timespan'), + + cbindData: function (initial) { + let me = this; + + me.datastore = encodeURIComponent(me.datastore); + me.url = `/api2/extjs/config/datastore/${me.datastore}`; + me.method = 'PUT'; + me.autoLoad = true; + return {}; + }, + + items: { + xtype: 'pbsRetentionTimespan', + name: 'max-retention-timespan', + fieldLabel: gettext('Retention Timespan'), + labelWidth: 150, + emptyText: gettext('None'), + }, +}); -- 2.47.3