all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH widget-toolkit 1/2] ComboGrid: use the grids view for the error message
Date: Wed, 18 Jan 2023 14:12:56 +0100	[thread overview]
Message-ID: <20230118131303.2892050-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20230118131303.2892050-1-d.csapak@proxmox.com>

for most of the combogrids, this does not make a difference, but we
want to have a node selection in some of their toolbars. There
having the error over the whole grid makes it impossible to select a
different node (which might be necessary to get rid of the error), so
we show the error on the view (which is the grids content body only).

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 src/form/ComboGrid.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/form/ComboGrid.js b/src/form/ComboGrid.js
index 4cb79d0..e903223 100644
--- a/src/form/ComboGrid.js
+++ b/src/form/ComboGrid.js
@@ -306,7 +306,7 @@ Ext.define('Proxmox.form.ComboGrid', {
 		picker.setMinHeight(100);
 	    }
 	    if (me.loadError) {
-		Proxmox.Utils.setErrorMask(picker, me.loadError);
+		Proxmox.Utils.setErrorMask(picker.getView(), me.loadError);
 		delete me.loadError;
 		picker.updateLayout();
 	    }
@@ -428,7 +428,7 @@ Ext.define('Proxmox.form.ComboGrid', {
 		    // if the picker exists, we reset its minHeight to the previous saved one or 0
 		    if (me.picker) {
 			me.picker.setMinHeight(me.savedMinHeight || 0);
-			Proxmox.Utils.setErrorMask(me.picker);
+			Proxmox.Utils.setErrorMask(me.picker.getView());
 			delete me.savedMinHeight;
 			// we have to update the layout, otherwise the height gets not recalculated
 			me.picker.updateLayout();
@@ -463,7 +463,7 @@ Ext.define('Proxmox.form.ComboGrid', {
 	    } else {
 		let msg = Proxmox.Utils.getResponseErrorMessage(o.getError());
 		if (me.picker) {
-		    Proxmox.Utils.setErrorMask(me.picker, msg);
+		    Proxmox.Utils.setErrorMask(me.picker.getView(), msg);
 		}
 		me.loadError = msg;
 	    }
-- 
2.30.2





  reply	other threads:[~2023-01-18 13:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-18 13:12 [pve-devel] [PATCH widget-toolkit/pve-manager] move node selection into combogrid Dominik Csapak
2023-01-18 13:12 ` Dominik Csapak [this message]
2023-01-18 13:12 ` [pve-devel] [PATCH widget-toolkit 2/2] ComboGrid: make height for the error configurable Dominik Csapak
2023-01-18 13:12 ` [pve-devel] [PATCH manager 1/6] ui: StorageScanNodeSelector: use null as empty value Dominik Csapak
2023-01-18 13:12 ` [pve-devel] [PATCH manager 2/6] ui: storage: move node scan selector inside combobox Dominik Csapak
2023-01-18 13:13 ` [pve-devel] [PATCH manager 3/6] ui: storage/LvmThinInputPanel: modernize & cleanup code Dominik Csapak
2023-01-18 13:13 ` [pve-devel] [PATCH manager 4/6] ui: storage/IScsiInputPanel: modernize, cleanup & improve panel Dominik Csapak
2023-01-18 13:13 ` [pve-devel] [PATCH manager 5/6] ui: storage/ZFSPoolInputPanel: modernize & cleanup code Dominik Csapak
2023-01-18 13:13 ` [pve-devel] [PATCH manager 6/6] ui: storage/LVMInputPanel: " Dominik Csapak
2023-01-18 15:08 ` [pve-devel] applied-series: [PATCH widget-toolkit/pve-manager] move node selection into combogrid Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230118131303.2892050-2-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal