155155 <a-input v-model:value =" form.host" ></a-input >
156156 </a-form-item >
157157 <a-form-item name =" datacenter" ref =" datacenter" :label =" $t('label.vcenterdatacenter')" >
158- <a-input v-model:value =" form.dataCenter " ></a-input >
158+ <a-input v-model:value =" form.datacenter " ></a-input >
159159 </a-form-item >
160160 <a-form-item name =" usedefaultvmwarecred" ref =" usedefaultvmwarecred" :label =" $t('label.use.existing.vcenter.credentials.from.zone')" >
161161 <a-switch v-model:checked =" form.usedefaultvmwarecred" @change =" onChangeUseDefaultVMwareCred()" />
@@ -266,6 +266,7 @@ export default {
266266 this .loading = true
267267 getAPI (' listZones' , { showicon: true }).then (response => {
268268 this .zonesList = response .listzonesresponse .zone || []
269+ this .form .zoneid = this .zonesList ? .[0 ]? .id || null
269270 this .fetchPods ()
270271 }).catch (error => {
271272 this .$notifyError (error)
@@ -288,7 +289,7 @@ export default {
288289 fetchPods () {
289290 this .loading = true
290291 getAPI (' listPods' , {
291- zoneid: this .zoneId
292+ zoneid: this .form . zoneid
292293 }).then (response => {
293294 this .podsList = response .listpodsresponse .pod || []
294295 }).catch (error => {
@@ -314,12 +315,12 @@ export default {
314315 this .loading = true
315316 this .clustertype = ' ExternalManaged'
316317 getAPI (' listVmwareDcs' , {
317- zoneid: this .form .zoneId
318+ zoneid: this .form .zoneid
318319 }).then (response => {
319320 var vmwaredcs = response .listvmwaredcsresponse .VMwareDC
320321 if (vmwaredcs !== null ) {
321322 this .form .host = vmwaredcs[0 ].vcenter
322- this .form .dataCenter = vmwaredcs[0 ].name
323+ this .form .datacenter = vmwaredcs[0 ].name
323324 }
324325 }).catch (error => {
325326 this .$notification .error ({
@@ -352,7 +353,7 @@ export default {
352353 var clustername = values .clustername
353354 var url = ' '
354355 if (values .hypervisor === ' VMware' ) {
355- clustername = ` ${ this .host } /${ this .dataCenter } /${ clustername} `
356+ clustername = ` ${ this .form . host } /${ this .form . datacenter } /${ clustername} `
356357 url = ` http://${ clustername} `
357358 }
358359 this .loading = true
0 commit comments