mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
UI: Fix for cluster addition in VMware (#11812)
This commit is contained in:
parent
973819dad6
commit
2b1f0bbbdb
@ -155,7 +155,7 @@
|
|||||||
<a-input v-model:value="form.host"></a-input>
|
<a-input v-model:value="form.host"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item name="datacenter" ref="datacenter" :label="$t('label.vcenterdatacenter')">
|
<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>
|
||||||
<a-form-item name="usedefaultvmwarecred" ref="usedefaultvmwarecred" :label="$t('label.use.existing.vcenter.credentials.from.zone')">
|
<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()" />
|
<a-switch v-model:checked="form.usedefaultvmwarecred" @change="onChangeUseDefaultVMwareCred()" />
|
||||||
@ -266,6 +266,7 @@ export default {
|
|||||||
this.loading = true
|
this.loading = true
|
||||||
getAPI('listZones', { showicon: true }).then(response => {
|
getAPI('listZones', { showicon: true }).then(response => {
|
||||||
this.zonesList = response.listzonesresponse.zone || []
|
this.zonesList = response.listzonesresponse.zone || []
|
||||||
|
this.form.zoneid = this.zonesList?.[0]?.id || null
|
||||||
this.fetchPods()
|
this.fetchPods()
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$notifyError(error)
|
this.$notifyError(error)
|
||||||
@ -288,7 +289,7 @@ export default {
|
|||||||
fetchPods () {
|
fetchPods () {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getAPI('listPods', {
|
getAPI('listPods', {
|
||||||
zoneid: this.zoneId
|
zoneid: this.form.zoneid
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.podsList = response.listpodsresponse.pod || []
|
this.podsList = response.listpodsresponse.pod || []
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
@ -314,12 +315,12 @@ export default {
|
|||||||
this.loading = true
|
this.loading = true
|
||||||
this.clustertype = 'ExternalManaged'
|
this.clustertype = 'ExternalManaged'
|
||||||
getAPI('listVmwareDcs', {
|
getAPI('listVmwareDcs', {
|
||||||
zoneid: this.form.zoneId
|
zoneid: this.form.zoneid
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
var vmwaredcs = response.listvmwaredcsresponse.VMwareDC
|
var vmwaredcs = response.listvmwaredcsresponse.VMwareDC
|
||||||
if (vmwaredcs !== null) {
|
if (vmwaredcs !== null) {
|
||||||
this.form.host = vmwaredcs[0].vcenter
|
this.form.host = vmwaredcs[0].vcenter
|
||||||
this.form.dataCenter = vmwaredcs[0].name
|
this.form.datacenter = vmwaredcs[0].name
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$notification.error({
|
this.$notification.error({
|
||||||
@ -352,7 +353,7 @@ export default {
|
|||||||
var clustername = values.clustername
|
var clustername = values.clustername
|
||||||
var url = ''
|
var url = ''
|
||||||
if (values.hypervisor === 'VMware') {
|
if (values.hypervisor === 'VMware') {
|
||||||
clustername = `${this.host}/${this.dataCenter}/${clustername}`
|
clustername = `${this.form.host}/${this.form.datacenter}/${clustername}`
|
||||||
url = `http://${clustername}`
|
url = `http://${clustername}`
|
||||||
}
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user