]> git.proxmox.com Git - pve-manager-legacy.git/commitdiff
gui/cluster: show cluster name from joinInfo in join dialog
authorStefan Reiter <s.reiter@proxmox.com>
Wed, 29 Jan 2020 10:27:20 +0000 (11:27 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 30 Jan 2020 14:13:01 +0000 (15:13 +0100)
To help a user identify if they put in the joinInfo for the correct
cluster.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
www/manager6/dc/ClusterEdit.js

index 0af858a5bb6a20336b0f5513a767913127aaa474..132029c18f6b71788cc5261247dde2434270c274 100644 (file)
@@ -147,6 +147,7 @@ Ext.define('PVE.ClusterJoinNodeWindow', {
            info: {
                fp: '',
                ip: '',
+               clusterName: '',
                ring0Needed: false,
                ring1Possible: false,
                ring1Needed: false
@@ -207,7 +208,8 @@ Ext.define('PVE.ClusterJoinNodeWindow', {
                fp: '',
                ring1Needed: false,
                ring1Possible: false,
-               ip: ''
+               ip: '',
+               clusterName: ''
            };
 
            var totem = {};
@@ -224,7 +226,8 @@ Ext.define('PVE.ClusterJoinNodeWindow', {
                    fp: joinInfo.fingerprint,
                    ring0Needed: ring0Needed,
                    ring1Possible: !!joinInfo.totem['interface']['1'],
-                   ring1Needed: !!joinInfo.totem['interface']['1']
+                   ring1Needed: !!joinInfo.totem['interface']['1'],
+                   clusterName: joinInfo.totem['cluster_name']
                };
                totem = joinInfo.totem;
                field.valid = true;
@@ -288,6 +291,16 @@ Ext.define('PVE.ClusterJoinNodeWindow', {
        },
        value: ''
     },
+    {
+       xtype: 'textfield',
+       fieldLabel: gettext('Cluster name'),
+       readOnly: true,
+       submitValue: false,
+       bind: {
+           hidden: '{!assistedEntry.checked}',
+           value: '{info.clusterName}'
+       },
+    },
     {
        xtype: 'inputpanel',
        column1: [