ui: clusterjoin: fix cluster network field visibility

Signed-off-by: Tim Marx <t.marx@proxmox.com>
This commit is contained in:
Tim Marx 2020-05-08 12:30:37 +02:00 committed by Thomas Lamprecht
parent 9a9f1ac5aa
commit 4081db0708

View File

@ -197,6 +197,8 @@ Ext.define('PVE.ClusterJoinNodeWindow', {
let vm = this.getViewModel(); let vm = this.getViewModel();
let assistedEntryBox = this.lookup('assistedEntry'); let assistedEntryBox = this.lookup('assistedEntry');
let linkEditorContainer = this.lookup('linkEditorContainer');
if (!assistedEntryBox.getValue()) { if (!assistedEntryBox.getValue()) {
// not in assisted entry mode, nothing to do // not in assisted entry mode, nothing to do
return; return;
@ -217,6 +219,7 @@ Ext.define('PVE.ClusterJoinNodeWindow', {
field.valid = false; field.valid = false;
linkEditor.setLinks([]); linkEditor.setLinks([]);
linkEditor.setInfoText(); linkEditor.setInfoText();
linkEditorContainer.setVisible(false);
} else { } else {
let interfaces = joinInfo.totem.interface; let interfaces = joinInfo.totem.interface;
let links = Object.values(interfaces).map(iface => { let links = Object.values(interfaces).map(iface => {
@ -249,8 +252,8 @@ Ext.define('PVE.ClusterJoinNodeWindow', {
clusterName: joinInfo.totem.cluster_name clusterName: joinInfo.totem.cluster_name
}; };
field.valid = true; field.valid = true;
linkEditorContainer.setVisible(true);
} }
vm.set('info', info); vm.set('info', info);
} }
}, },
@ -355,6 +358,10 @@ Ext.define('PVE.ClusterJoinNodeWindow', {
{ {
xtype: 'fieldcontainer', xtype: 'fieldcontainer',
fieldLabel: gettext("Cluster Network"), fieldLabel: gettext("Cluster Network"),
bind: {
hidden: '{assistedEntry.checked}'
},
reference: 'linkEditorContainer',
items: [ items: [
{ {
xtype: 'pveCorosyncLinkEditor', xtype: 'pveCorosyncLinkEditor',