From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <pve-devel-bounces@lists.proxmox.com> Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 71E161FF15E for <inbox@lore.proxmox.com>; Tue, 3 Jun 2025 15:10:04 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 7B44F19B52; Tue, 3 Jun 2025 15:10:13 +0200 (CEST) From: Christian Ebner <c.ebner@proxmox.com> To: pve-devel@lists.proxmox.com Date: Tue, 3 Jun 2025 15:09:15 +0200 Message-Id: <20250603130916.310066-3-c.ebner@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250603130916.310066-1-c.ebner@proxmox.com> References: <20250603130916.310066-1-c.ebner@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.034 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 1/2] ui: add dedicated form for PBS change detecton mode selector X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com> List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe> List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/> List-Post: <mailto:pve-devel@lists.proxmox.com> List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help> List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe> Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com> Reduce duplicate code by merging common parts of the change detection mode selector. Allows to control a common selector used by the advanced options of the backup job and the window for one-shot backup runs in one place. No functional changes intended. Signed-off-by: Christian Ebner <c.ebner@proxmox.com> --- NOTE: Assumes repo pre-formatted with proxmox-biome to apply www/manager6/Makefile | 1 + www/manager6/form/PbsChangeDetectionModeSelector.js | 10 ++++++++++ www/manager6/panel/BackupAdvancedOptions.js | 8 +------- www/manager6/window/Backup.js | 8 +------- 4 files changed, 13 insertions(+), 14 deletions(-) create mode 100644 www/manager6/form/PbsChangeDetectionModeSelector.js diff --git a/www/manager6/Makefile b/www/manager6/Makefile index fdf0e816..255271c5 100644 --- a/www/manager6/Makefile +++ b/www/manager6/Makefile @@ -55,6 +55,7 @@ JSSRC= \ form/NotificationModeSelector.js \ form/NotificationTargetSelector.js \ form/NotificationPolicySelector.js \ + form/PbsChangeDetectionModeSelector.js \ form/PCISelector.js \ form/PCIMapSelector.js \ form/PermPathSelector.js \ diff --git a/www/manager6/form/PbsChangeDetectionModeSelector.js b/www/manager6/form/PbsChangeDetectionModeSelector.js new file mode 100644 index 00000000..6e55aabd --- /dev/null +++ b/www/manager6/form/PbsChangeDetectionModeSelector.js @@ -0,0 +1,10 @@ +Ext.define('PVE.form.PBSChangeDetectionModeSelector', { + extend: 'Proxmox.form.KVComboBox', + alias: ['widget.pbsChangeDetectionModeSelector'], + deleteEmpty: true, + comboItems: [ + ['__default__', 'Default'], + ['data', 'Data'], + ['metadata', 'Metadata'], + ], +}); diff --git a/www/manager6/panel/BackupAdvancedOptions.js b/www/manager6/panel/BackupAdvancedOptions.js index fe8cc3bf..32fe4de5 100644 --- a/www/manager6/panel/BackupAdvancedOptions.js +++ b/www/manager6/panel/BackupAdvancedOptions.js @@ -276,16 +276,10 @@ Ext.define('PVE.panel.BackupAdvancedOptions', { { xtype: 'pveTwoColumnContainer', startColumn: { - xtype: 'proxmoxKVComboBox', + xtype: 'pbsChangeDetectionModeSelector', fieldLabel: gettext('PBS change detection mode'), name: 'pbs-change-detection-mode', - deleteEmpty: true, value: '__default__', - comboItems: [ - ['__default__', 'Default'], - ['data', 'Data'], - ['metadata', 'Metadata'], - ], }, endFlex: 2, endColumn: { diff --git a/www/manager6/window/Backup.js b/www/manager6/window/Backup.js index 00ccce4b..d4542453 100644 --- a/www/manager6/window/Backup.js +++ b/www/manager6/window/Backup.js @@ -54,17 +54,11 @@ Ext.define('PVE.window.Backup', { }); let pbsChangeDetectionModeSelector = Ext.create({ - xtype: 'proxmoxKVComboBox', + xtype: 'pbsChangeDetectionModeSelector', flex: 1, disabled: true, name: 'pbs-change-detection-mode', - deleteEmpty: true, value: '__default__', - comboItems: [ - ['__default__', 'Default'], - ['data', 'Data'], - ['metadata', 'Metadata'], - ], }); let pbsChangeDetection = Ext.create('Ext.form.FieldContainer', { -- 2.39.5 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel