[pve-devel] [PATCH v2 manager 1/4] ui: storage selector: only check for nodename before loading storage

Fabian Ebner f.ebner at proxmox.com
Tue Sep 21 13:22:05 CEST 2021


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 at 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






More information about the pve-devel mailing list