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 2956E1FF0E7 for ; Thu, 13 Aug 2026 19:11:37 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 2933621B2D; Thu, 13 Aug 2026 19:11:15 +0200 (CEST) From: Christian Ebner To: pbs-devel@lists.proxmox.com Subject: [PATCH proxmox-backup 26/28] ui: allow datastore wide max retention timespan configuration Date: Thu, 13 Aug 2026 19:10:00 +0200 Message-ID: <20260813171002.809441-27-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260813171002.809441-1-c.ebner@proxmox.com> References: <20260813171002.809441-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: 1786641018793 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.196 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 RDNS_NONE 1.274 Delivered to internal network by a host with no rDNS 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: YXKGEOO3U3TVYAEE6Q5VMHSELWXQAJP5 X-Message-ID-Hash: YXKGEOO3U3TVYAEE6Q5VMHSELWXQAJP5 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 | 27 ++++++++++++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 www/window/MaxRetentionTimespanEdit.js diff --git a/www/Makefile b/www/Makefile index e14a17507..42691d466 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 42a6104dc..b5ef14eb1 100644 --- a/www/datastore/OptionView.js +++ b/www/datastore/OptionView.js @@ -384,5 +384,13 @@ Ext.define('PBS.Datastore.Options', { xtype: 'pbsThresholdResetScheduleEdit', }, }, + 'max-retention-timespan': { + required: true, + header: gettext('Maximum Retention'), + renderer: (schedule) => schedule ?? gettext('None'), + editor: { + xtype: 'pbsMaxRetentionTimespanEdit', + }, + }, }, }); diff --git a/www/window/MaxRetentionTimespanEdit.js b/www/window/MaxRetentionTimespanEdit.js new file mode 100644 index 000000000..dc8aebe28 --- /dev/null +++ b/www/window/MaxRetentionTimespanEdit.js @@ -0,0 +1,27 @@ +Ext.define('PBS.window.MaxRetentionTimespanEdit', { + extend: 'Proxmox.window.Edit', + alias: 'widget.pbsMaxRetentionTimespanEdit', + mixins: ['Proxmox.Mixin.CBind'], + + userid: undefined, + isAdd: false, + + 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'), + emptyText: gettext('none'), + }, +}); -- 2.47.3