This is an automated email from the ASF dual-hosted git repository.

harikrishna pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/main by this push:
     new 2b1f0bbbdbd UI: Fix for cluster addition in VMware (#11812)
2b1f0bbbdbd is described below

commit 2b1f0bbbdbd6909076e7d7a5cb7fdc0a954450cc
Author: Suresh Kumar Anaparti <[email protected]>
AuthorDate: Fri Oct 10 12:35:41 2025 +0530

    UI: Fix for cluster addition in VMware (#11812)
---
 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 7fee1f11bf6..be561832f31 100644
--- a/ui/src/views/infra/ClusterAdd.vue
+++ b/ui/src/views/infra/ClusterAdd.vue
@@ -155,7 +155,7 @@
           <a-input v-model:value="form.host"></a-input>
         </a-form-item>
         <a-form-item name="datacenter" ref="datacenter" 
:label="$t('label.vcenterdatacenter')">
-          <a-input v-model:value="form.dataCenter"></a-input>
+          <a-input v-model:value="form.datacenter"></a-input>
         </a-form-item>
         <a-form-item name="usedefaultvmwarecred" ref="usedefaultvmwarecred" 
:label="$t('label.use.existing.vcenter.credentials.from.zone')">
           <a-switch v-model:checked="form.usedefaultvmwarecred" 
@change="onChangeUseDefaultVMwareCred()" />
@@ -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

Reply via email to