From 3edcea361fa71fb0e69339827a8e532ee3289226 Mon Sep 17 00:00:00 2001 From: Suresh Kumar Anaparti Date: Thu, 9 Oct 2025 14:17:50 +0530 Subject: [PATCH] UI: Fix for cluster addition in VMware --- ui/src/views/infra/ClusterAdd.vue | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ui/src/views/infra/ClusterAdd.vue b/ui/src/views/infra/ClusterAdd.vue index 7fee1f11bf6c..be561832f31b 100644 --- a/ui/src/views/infra/ClusterAdd.vue +++ b/ui/src/views/infra/ClusterAdd.vue @@ -155,7 +155,7 @@ - + @@ -266,6 +266,7 @@ export default { this.loading = true getAPI('listZones', { showicon: true }).then(response => { this.zonesList = response.listzonesresponse.zone || [] + this.form.zoneid = this.zonesList?.[0]?.id || null this.fetchPods() }).catch(error => { this.$notifyError(error) @@ -288,7 +289,7 @@ export default { fetchPods () { this.loading = true getAPI('listPods', { - zoneid: this.zoneId + zoneid: this.form.zoneid }).then(response => { this.podsList = response.listpodsresponse.pod || [] }).catch(error => { @@ -314,12 +315,12 @@ export default { this.loading = true this.clustertype = 'ExternalManaged' getAPI('listVmwareDcs', { - zoneid: this.form.zoneId + zoneid: this.form.zoneid }).then(response => { var vmwaredcs = response.listvmwaredcsresponse.VMwareDC if (vmwaredcs !== null) { this.form.host = vmwaredcs[0].vcenter - this.form.dataCenter = vmwaredcs[0].name + this.form.datacenter = vmwaredcs[0].name } }).catch(error => { this.$notification.error({ @@ -352,7 +353,7 @@ export default { var clustername = values.clustername var url = '' if (values.hypervisor === 'VMware') { - clustername = `${this.host}/${this.dataCenter}/${clustername}` + clustername = `${this.form.host}/${this.form.datacenter}/${clustername}` url = `http://${clustername}` } this.loading = true