ui: storage selector: only check for nodename before loading storage

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>
This commit is contained in:
Fabian Ebner 2021-09-21 13:22:05 +02:00 committed by Thomas Lamprecht
parent 6c23fbbec0
commit 1c646aa280

View File

@ -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);
}
},
}, function() {
Ext.define('pve-storage-status', {