fp: '',
ip: '',
clusterName: ''
- }
+ },
+ hasAssistedInfo: false,
},
formulas: {
submittxt: function(get) {
}
return gettext('Join');
},
+ showClusterFields: (get) => {
+ let manualMode = !get('assistedEntry.checked');
+ return get('hasAssistedInfo') || manualMode;
+ },
},
},
let vm = this.getViewModel();
let assistedEntryBox = this.lookup('assistedEntry');
- let linkEditorContainer = this.lookup('linkEditorContainer');
if (!assistedEntryBox.getValue()) {
// not in assisted entry mode, nothing to do
+ vm.set('hasAssistedInfo', false);
return;
}
field.valid = false;
linkEditor.setLinks([]);
linkEditor.setInfoText();
- linkEditorContainer.setVisible(false);
+ vm.set('hasAssistedInfo', false);
} else {
let interfaces = joinInfo.totem.interface;
let links = Object.values(interfaces).map(iface => {
clusterName: joinInfo.totem.cluster_name
};
field.valid = true;
- linkEditorContainer.setVisible(true);
+ vm.set('hasAssistedInfo', true);
}
vm.set('info', info);
}
type: 'hbox',
align: 'center'
},
+ bind: {
+ hidden: '{!showClusterFields}',
+ },
items: [
{
xtype: 'textfield',
allowBlank: false,
bind: {
value: '{info.fp}',
- readOnly: '{assistedEntry.checked}'
+ readOnly: '{assistedEntry.checked}',
+ hidden: '{!showClusterFields}',
},
name: 'fingerprint'
},
xtype: 'fieldcontainer',
fieldLabel: gettext("Cluster Network"),
bind: {
- hidden: '{assistedEntry.checked}'
+ hidden: '{!showClusterFields}',
},
- reference: 'linkEditorContainer',
items: [
{
xtype: 'pveCorosyncLinkEditor',