From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 356351FF17A for ; Fri, 18 Jul 2025 14:53:49 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id A3E921E8E6; Fri, 18 Jul 2025 14:54:47 +0200 (CEST) From: Fiona Ebner To: pve-devel@lists.proxmox.com Date: Fri, 18 Jul 2025 14:51:16 +0200 Message-ID: <20250718125408.133376-6-f.ebner@proxmox.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250718125408.133376-1-f.ebner@proxmox.com> References: <20250718125408.133376-1-f.ebner@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1752843249191 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.027 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH manager 5/6] ui: drop handling of removed 'maxfiles' setting X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Signed-off-by: Fiona Ebner --- www/manager6/controller/StorageEdit.js | 12 ------------ www/manager6/dc/Backup.js | 7 ------- www/manager6/dc/BackupJobDetail.js | 4 +--- www/manager6/panel/BackupJobPrune.js | 5 +---- www/manager6/storage/Base.js | 5 ----- 5 files changed, 2 insertions(+), 31 deletions(-) diff --git a/www/manager6/controller/StorageEdit.js b/www/manager6/controller/StorageEdit.js index 384f9ab4..1acadbe3 100644 --- a/www/manager6/controller/StorageEdit.js +++ b/www/manager6/controller/StorageEdit.js @@ -9,18 +9,6 @@ Ext.define('PVE.controller.StorageEdit', { if (prealloc) { prealloc.setDisabled(!hasImages); } - - var hasBackups = Ext.Array.contains(value, 'backup'); - var maxfiles = this.lookupReference('maxfiles'); - if (!maxfiles) { - return; - } - - if (!hasBackups) { - // clear values which will never be submitted - maxfiles.reset(); - } - maxfiles.setDisabled(!hasBackups); }, }, }, diff --git a/www/manager6/dc/Backup.js b/www/manager6/dc/Backup.js index 0ad49568..dff588b2 100644 --- a/www/manager6/dc/Backup.js +++ b/www/manager6/dc/Backup.js @@ -167,13 +167,6 @@ Ext.define('PVE.dc.BackupEdit', { if (data['prune-backups']) { Object.assign(data, data['prune-backups']); delete data['prune-backups']; - } else if (data.maxfiles !== undefined) { - if (data.maxfiles > 0) { - data['keep-last'] = data.maxfiles; - } else { - data['keep-all'] = 1; - } - delete data.maxfiles; } if (data['notes-template']) { diff --git a/www/manager6/dc/BackupJobDetail.js b/www/manager6/dc/BackupJobDetail.js index 67ec5273..86a593b3 100644 --- a/www/manager6/dc/BackupJobDetail.js +++ b/www/manager6/dc/BackupJobDetail.js @@ -371,12 +371,10 @@ Ext.define('PVE.dc.BackupInfo', { } }); - if (values['prune-backups'] || values.maxfiles !== undefined) { + if (values['prune-backups']) { let keepValues; if (values['prune-backups']) { keepValues = values['prune-backups']; - } else if (values.maxfiles > 0) { - keepValues = { 'keep-last': values.maxfiles }; } else { keepValues = { 'keep-all': 1 }; } diff --git a/www/manager6/panel/BackupJobPrune.js b/www/manager6/panel/BackupJobPrune.js index 960142b5..cf34ea83 100644 --- a/www/manager6/panel/BackupJobPrune.js +++ b/www/manager6/panel/BackupJobPrune.js @@ -35,10 +35,7 @@ Ext.define('PVE.panel.BackupJobPrune', { options['prune-backups'] = retention; } - if (!this.isCreate) { - // always delete old 'maxfiles' on edit, we map it to keep-last on window load - options.delete.push('maxfiles'); - } else { + if (this.isCreate) { delete options.delete; } diff --git a/www/manager6/storage/Base.js b/www/manager6/storage/Base.js index d945cf79..a3177faa 100644 --- a/www/manager6/storage/Base.js +++ b/www/manager6/storage/Base.js @@ -186,11 +186,6 @@ Ext.define('PVE.storage.BaseEdit', { let retention = PVE.Parser.parsePropertyString(values['prune-backups']); delete values['prune-backups']; Object.assign(values, retention); - } else if (values.maxfiles !== undefined) { - if (values.maxfiles > 0) { - values['keep-last'] = values.maxfiles; - } - delete values.maxfiles; } me.query('inputpanel').forEach((panel) => { -- 2.47.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel