File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -247,19 +247,30 @@ export default {
247247 }
248248 this .loading = true
249249 this .parentToggleLoading ()
250- api ( ' addCluster ' , {}, ' POST ' , {
250+ var data = {
251251 zoneId: this .zoneId ,
252252 hypervisor: this .hypervisor ,
253253 clustertype: this .clustertype ,
254254 podId: this .podId ,
255255 clustername: this .clustername ,
256- ovm3pool: this .ovm3pool ,
257- ovm3cluster: this .ovm3cluster ,
258- ovm3vip: this .ovm3vip ,
259- username: this .username ,
260- password: this .password ,
261256 url: this .url
262- }).then (response => {
257+ }
258+ if (this .ovm3pool ) {
259+ data .ovm3pool = this .ovm3pool
260+ }
261+ if (this .ovm3cluster ) {
262+ data .ovm3cluster = this .ovm3cluster
263+ }
264+ if (this .ovm3vip ) {
265+ data .ovm3vip = this .ovm3vip
266+ }
267+ if (this .username ) {
268+ data .username = this .username
269+ }
270+ if (this .password ) {
271+ data .password = this .password
272+ }
273+ api (' addCluster' , {}, ' POST' , data).then (response => {
263274 const cluster = response .addclusterresponse .cluster [0 ] || {}
264275 if (cluster .id && this .showDedicated ) {
265276 this .dedicateCluster (cluster .id )
You can’t perform that action at this time.
0 commit comments