From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 73BC71FF0AF for ; Fri, 06 Nov 2026 01:54:25 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id BE5A821A53; Fri, 06 Nov 2026 01:51:09 +0100 (CET) From: Thomas Lamprecht To: pve-devel@lists.proxmox.com Subject: [PATCH v3 manager 47/76] ui: storage: factor out the scan picker error mask Date: Fri, 6 Nov 2026 00:31:22 +0100 Message-ID: <20261105233336.2178064-48-t.lamprecht@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261105233336.2178064-1-t.lamprecht@proxmox.com> References: <20261105233336.2178064-1-t.lamprecht@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1793926180666 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.317 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: WAXZTN5NWUHJZLF2HOCATEC77PGVDQGW X-Message-ID-Hash: WAXZTN5NWUHJZLF2HOCATEC77PGVDQGW X-MailFrom: t.lamprecht@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 VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The CIFS picker masks its list itself because monStoreErrors would mask the combo field instead. Share the helper so the NFS picker can display scan errors the same way. This does not change behavior. Signed-off-by: Thomas Lamprecht --- www/manager6/Utils.js | 21 +++++++++++++++++++++ www/manager6/storage/CIFSEdit.js | 19 +------------------ 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js index 7704404cf..ca850158b 100644 --- a/www/manager6/Utils.js +++ b/www/manager6/Utils.js @@ -439,6 +439,27 @@ Ext.define('PVE.Utils', { renderNotFound: (what) => Ext.String.format(gettext('No {0} found'), what), + // monStoreErrors would mask the field of a combo box, not its picker list + monPickerStoreErrors: function (combo, store) { + let picker = combo.getPicker(); + picker.mon(store, 'beforeload', function () { + picker.unmask(); + delete picker.minHeight; + }); + picker.mon(store.proxy, 'afterload', function (proxy, request, success) { + if (success) { + Proxmox.Utils.setErrorMask(picker, false); + return; + } + let error = request._operation.getError(); + let msg = Proxmox.Utils.getResponseErrorMessage(error); + if (msg) { + picker.minHeight = 100; + } + Proxmox.Utils.setErrorMask(picker, msg); + }); + }, + get_kvm_osinfo: function (value) { var info = { base: 'Other' }; // default if (value) { diff --git a/www/manager6/storage/CIFSEdit.js b/www/manager6/storage/CIFSEdit.js index 5fe3fefea..531f390cc 100644 --- a/www/manager6/storage/CIFSEdit.js +++ b/www/manager6/storage/CIFSEdit.js @@ -94,24 +94,7 @@ Ext.define('PVE.storage.CIFSScan', { me.callParent(); - let picker = me.getPicker(); - // don't use monStoreErrors directly, it doesn't copes well with comboboxes - picker.mon(store, 'beforeload', function (s, operation, eOpts) { - picker.unmask(); - delete picker.minHeight; - }); - picker.mon(store.proxy, 'afterload', function (proxy, request, success) { - if (success) { - Proxmox.Utils.setErrorMask(picker, false); - return; - } - let error = request._operation.getError(); - let msg = Proxmox.Utils.getResponseErrorMessage(error); - if (msg) { - picker.minHeight = 100; - } - Proxmox.Utils.setErrorMask(picker, msg); - }); + PVE.Utils.monPickerStoreErrors(me, store); }, }); -- 2.47.3