public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fabian Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH v5 manager 3/6] ui: backup window: set loading mask early enough
Date: Thu,  6 May 2021 14:16:29 +0200	[thread overview]
Message-ID: <20210506121632.8417-4-f.ebner@proxmox.com> (raw)
In-Reply-To: <20210506121632.8417-1-f.ebner@proxmox.com>

but not too early. Because of an ExtJS bug/limitation, it can only happen after
the window is rendered, so use an afterrender listener. Without setting the
mask there, the window will be active already before the storage selectors
change listener triggers, which can only happen after the storage selectors
store is loaded.

Made noticable by the new "filling in defaults" behavior, but the issue was
already present earlier, where the compression selector for PBS storages would
be disabled late, after the window was already active.

Also move the setValue call into the afterrender listener, so ordering is easy
to verify/more stable.

Reported-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---
 www/manager6/window/Backup.js | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/www/manager6/window/Backup.js b/www/manager6/window/Backup.js
index 76a4987e..8d9824f3 100644
--- a/www/manager6/window/Backup.js
+++ b/www/manager6/window/Backup.js
@@ -46,6 +46,10 @@ Ext.define('PVE.window.Backup', {
 	    allowBlank: false,
 	    listeners: {
 		change: function(f, v) {
+		    if (!initialDefaults) {
+			me.setLoading(false);
+		    }
+
 		    if (v === null || v === undefined || v === '') {
 			return;
 		    }
@@ -87,7 +91,6 @@ Ext.define('PVE.window.Backup', {
 		},
 	    },
 	});
-	storagesel.setValue(me.storage);
 
 	me.formPanel = Ext.create('Ext.form.Panel', {
 	    bodyPadding: 10,
@@ -172,6 +175,13 @@ Ext.define('PVE.window.Backup', {
 	    border: false,
 	    items: [me.formPanel],
 	    buttons: [helpBtn, '->', submitBtn],
+	    listeners: {
+		afterrender: function() {
+		    /// cleared within the storage selector's change listener
+		    me.setLoading(gettext('Please wait...'));
+		    storagesel.setValue(me.storage);
+		},
+	    },
 	});
 
 	me.callParent();
-- 
2.20.1





  parent reply	other threads:[~2021-05-06 12:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-06 12:16 [pve-devel] [PATCH-SERIES v5 manager] fix #2745: allow specifying remove parameter for manual backup Fabian Ebner
2021-05-06 12:16 ` [pve-devel] [PATCH v5 manager 1/6] ui: backup window: avoid issuing API call with null/empty parameter Fabian Ebner
2021-05-06 12:16 ` [pve-devel] [PATCH v5 manager 2/6] ui: backup window: also set initialDefaults variable in failure case Fabian Ebner
2021-05-06 12:16 ` Fabian Ebner [this message]
2021-05-06 12:16 ` [pve-devel] [PATCH v5 manager 4/6] ui: backup window: switch to proxmox input panel Fabian Ebner
2021-05-06 12:16 ` [pve-devel] [PATCH v5 manager 5/6] ui: backup window: switch to two-column layout Fabian Ebner
2021-05-06 12:16 ` [pve-devel] [PATCH v5 manager 6/6] fix #2745: ui: backup window: allow specifying remove parameter for manual backup Fabian Ebner
2021-05-07  6:56 ` [pve-devel] [PATCH v5 manager 7/7] ui: backup window: also reset removal fields when defaults API call fails Fabian Ebner
2021-06-17 16:00 ` [pve-devel] applied-series: [PATCH-SERIES v5 manager] fix #2745: allow specifying remove parameter for manual backup 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=20210506121632.8417-4-f.ebner@proxmox.com \
    --to=f.ebner@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal