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 v2 manager 1/4] ui: storage selector: only check for nodename before loading storage
Date: Tue, 21 Sep 2021 13:22:05 +0200	[thread overview]
Message-ID: <20210921112208.48084-2-f.ebner@proxmox.com> (raw)
In-Reply-To: <20210921112208.48084-1-f.ebner@proxmox.com>

but allow an empty nodename to be set. This is in preparation for
allowing a cluster view as well, where an empty node name will
indicate that no node is selected.

Since the reloadStorageList function still returns early if there is
no nodename, this should not lead to any issues.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---

New in v2.

 www/manager6/form/StorageSelector.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/www/manager6/form/StorageSelector.js b/www/manager6/form/StorageSelector.js
index 631eb378..bb56f159 100644
--- a/www/manager6/form/StorageSelector.js
+++ b/www/manager6/form/StorageSelector.js
@@ -74,7 +74,9 @@ Ext.define('PVE.form.StorageSelector', {
     setNodename: function(nodename) {
 	var me = this;
 
-	if (!nodename || me.nodename === nodename) {
+	nodename = nodename || '';
+
+	if (me.nodename === nodename) {
 	    return;
 	}
 
@@ -103,9 +105,7 @@ Ext.define('PVE.form.StorageSelector', {
 
 	me.callParent();
 
-	if (nodename) {
-	    me.setNodename(nodename);
-	}
+	me.setNodename(nodename);
     },
 }, function() {
     Ext.define('pve-storage-status', {
-- 
2.30.2





  reply	other threads:[~2021-09-21 11:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-21 11:22 [pve-devel] [PATCH-SERIES v2 manager] ui: some backup job improvements Fabian Ebner
2021-09-21 11:22 ` Fabian Ebner [this message]
2021-09-21 11:22 ` [pve-devel] [PATCH v2 manager 2/4] ui: storage selector: add new clusterView option Fabian Ebner
2021-09-21 11:22 ` [pve-devel] [PATCH v2 manager 3/4] ui: cluster backup: only restrict storages to node when it's selected Fabian Ebner
2021-09-21 11:22 ` [pve-devel] [PATCH v2 manager 4/4] ui: storage selector: use storage type renderer Fabian Ebner
2021-09-21 13:31 ` [pve-devel] applied-series-partially: [PATCH-SERIES v2 manager] ui: some backup job improvements 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=20210921112208.48084-2-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