File tree Expand file tree Collapse file tree 2 files changed +26
-18
lines changed
Expand file tree Collapse file tree 2 files changed +26
-18
lines changed Original file line number Diff line number Diff line change @@ -328,15 +328,19 @@ export default {
328328 } else { // from guest network section
329329 var params = {}
330330 this .networkOfferingLoading = true
331- api (' listVPCs' , params).then (json => {
332- const listVPCs = json .listvpcsresponse .vpc
333- var vpcAvailable = this .arrayHasItems (listVPCs)
334- if (vpcAvailable === false ) {
335- this .fetchNetworkOfferingData (false )
336- } else {
337- this .fetchNetworkOfferingData ()
338- }
339- })
331+ if (' listVPCs' in this .$store .getters .apis ) {
332+ api (' listVPCs' , params).then (json => {
333+ const listVPCs = json .listvpcsresponse .vpc
334+ var vpcAvailable = this .arrayHasItems (listVPCs)
335+ if (vpcAvailable === false ) {
336+ this .fetchNetworkOfferingData (false )
337+ } else {
338+ this .fetchNetworkOfferingData ()
339+ }
340+ })
341+ } else {
342+ this .fetchNetworkOfferingData (false )
343+ }
340344 }
341345 },
342346 fetchNetworkOfferingData (forVpc ) {
Original file line number Diff line number Diff line change @@ -317,15 +317,19 @@ export default {
317317 } else { // from guest network section
318318 var params = {}
319319 this .networkOfferingLoading = true
320- api (' listVPCs' , params).then (json => {
321- const listVPCs = json .listvpcsresponse .vpc
322- var vpcAvailable = this .arrayHasItems (listVPCs)
323- if (vpcAvailable === false ) {
324- this .fetchNetworkOfferingData (false )
325- } else {
326- this .fetchNetworkOfferingData ()
327- }
328- })
320+ if (' listVPCs' in this .$store .getters .apis ) {
321+ api (' listVPCs' , params).then (json => {
322+ const listVPCs = json .listvpcsresponse .vpc
323+ var vpcAvailable = this .arrayHasItems (listVPCs)
324+ if (vpcAvailable === false ) {
325+ this .fetchNetworkOfferingData (false )
326+ } else {
327+ this .fetchNetworkOfferingData ()
328+ }
329+ })
330+ } else {
331+ this .fetchNetworkOfferingData (false )
332+ }
329333 }
330334 },
331335 fetchNetworkOfferingData (forVpc ) {
You can’t perform that action at this time.
0 commit comments