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 41BF91FF1BD for ; Fri, 24 Apr 2026 14:29:31 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 924AE17744; Fri, 24 Apr 2026 13:52:19 +0200 (CEST) From: Dominik Csapak To: pbs-devel@lists.proxmox.com Subject: [PATCH proxmox-backup] ui: encryption keys: always enable tape encryption restore button Date: Fri, 24 Apr 2026 13:52:09 +0200 Message-ID: <20260424115215.2377890-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.050 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 Message-ID-Hash: TMNIZUIBPS32RY4WYQKDMFI2OKQOAMQT X-Message-ID-Hash: TMNIZUIBPS32RY4WYQKDMFI2OKQOAMQT X-MailFrom: d.csapak@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: Restoring a tape key should not require an existing tape key to select, since it will be a new key, not overwriting the existing one. (In the tape backup -> encryption keys view it's also always enabled) To do that, remove the disabled/enableFn properties, but then the component must be a 'button' (a proxmoxButton needs a record for it to be enabled). To make it a bit clearer that it does not have anything to do with the listed keys, rename it to 'Restore Tape Key' and move it over to the right of the toolbar. While touching this, rename 'restoreEncryptionKey' to 'restoreTapeEncryptionKey' to make it also clearer in the code what it does. Signed-off-by: Dominik Csapak --- www/config/EncryptionKeysView.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/www/config/EncryptionKeysView.js b/www/config/EncryptionKeysView.js index cdcd986a6..0f9367c72 100644 --- a/www/config/EncryptionKeysView.js +++ b/www/config/EncryptionKeysView.js @@ -112,7 +112,7 @@ Ext.define('PBS.config.EncryptionKeysView', { }).show(); }, - restoreEncryptionKey: function () { + restoreTapeEncryptionKey: function () { Ext.create('Proxmox.window.Edit', { title: gettext('Restore Key'), isCreate: true, @@ -275,13 +275,11 @@ Ext.define('PBS.config.EncryptionKeysView', { (item.data.type === 'sync' && !!item.data['archived-at']) || item.data.type === 'tape', }, - '-', + '->', { - text: gettext('Restore Key'), - xtype: 'proxmoxButton', - handler: 'restoreEncryptionKey', - disabled: true, - enableFn: (item) => item.data.type === 'tape', + text: gettext('Restore Tape Key'), + xtype: 'button', + handler: 'restoreTapeEncryptionKey', }, ], -- 2.47.3