mirror of https://github.com/apache/cloudstack.git
ui: fix add cluster form for vmware (#4841)
Filter null values else API returns error. Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
parent
6262366d85
commit
83b568ecde
|
|
@ -247,19 +247,30 @@ export default {
|
|||
}
|
||||
this.loading = true
|
||||
this.parentToggleLoading()
|
||||
api('addCluster', {}, 'POST', {
|
||||
var data = {
|
||||
zoneId: this.zoneId,
|
||||
hypervisor: this.hypervisor,
|
||||
clustertype: this.clustertype,
|
||||
podId: this.podId,
|
||||
clustername: this.clustername,
|
||||
ovm3pool: this.ovm3pool,
|
||||
ovm3cluster: this.ovm3cluster,
|
||||
ovm3vip: this.ovm3vip,
|
||||
username: this.username,
|
||||
password: this.password,
|
||||
url: this.url
|
||||
}).then(response => {
|
||||
}
|
||||
if (this.ovm3pool) {
|
||||
data.ovm3pool = this.ovm3pool
|
||||
}
|
||||
if (this.ovm3cluster) {
|
||||
data.ovm3cluster = this.ovm3cluster
|
||||
}
|
||||
if (this.ovm3vip) {
|
||||
data.ovm3vip = this.ovm3vip
|
||||
}
|
||||
if (this.username) {
|
||||
data.username = this.username
|
||||
}
|
||||
if (this.password) {
|
||||
data.password = this.password
|
||||
}
|
||||
api('addCluster', {}, 'POST', data).then(response => {
|
||||
const cluster = response.addclusterresponse.cluster[0] || {}
|
||||
if (cluster.id && this.showDedicated) {
|
||||
this.dedicateCluster(cluster.id)
|
||||
|
|
|
|||
Loading…
Reference in New Issue