[pve-devel] [PATCH manager] ui: clusterjoin: fix cluster network field visibility

Tim Marx t.marx at proxmox.com
Fri May 8 12:30:37 CEST 2020


Signed-off-by: Tim Marx <t.marx at proxmox.com>
---
 www/manager6/dc/ClusterEdit.js | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/www/manager6/dc/ClusterEdit.js b/www/manager6/dc/ClusterEdit.js
index 227812d3..b4603291 100644
--- a/www/manager6/dc/ClusterEdit.js
+++ b/www/manager6/dc/ClusterEdit.js
@@ -191,6 +191,8 @@ Ext.define('PVE.ClusterJoinNodeWindow', {
 	    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
 		return;
@@ -211,6 +213,7 @@ Ext.define('PVE.ClusterJoinNodeWindow', {
 		field.valid = false;
 		linkEditor.setLinks([]);
 		linkEditor.setInfoText();
+		linkEditorContainer.setVisible(false);
 	    } else {
 		let interfaces = joinInfo.totem.interface;
 		let links = Object.values(interfaces).map(iface => {
@@ -243,8 +246,8 @@ Ext.define('PVE.ClusterJoinNodeWindow', {
 		    clusterName: joinInfo.totem.cluster_name
 		};
 		field.valid = true;
+		linkEditorContainer.setVisible(true);
 	    }
-
 	    vm.set('info', info);
 	}
     },
@@ -349,6 +352,10 @@ Ext.define('PVE.ClusterJoinNodeWindow', {
     {
 	xtype: 'fieldcontainer',
 	fieldLabel: gettext("Cluster Network"),
+	bind: {
+	    hidden: '{assistedEntry.checked}'
+	},
+	reference: 'linkEditorContainer',
 	items: [
 	    {
 		xtype: 'pveCorosyncLinkEditor',
-- 
2.20.1




More information about the pve-devel mailing list