mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
ui: Network offerings not listed if listVPCs not available in the account Role (#6354)
This commit is contained in:
parent
efb1f2b719
commit
556f9dac0f
@ -328,6 +328,7 @@ export default {
|
|||||||
} else { // from guest network section
|
} else { // from guest network section
|
||||||
var params = {}
|
var params = {}
|
||||||
this.networkOfferingLoading = true
|
this.networkOfferingLoading = true
|
||||||
|
if ('listVPCs' in this.$store.getters.apis) {
|
||||||
api('listVPCs', params).then(json => {
|
api('listVPCs', params).then(json => {
|
||||||
const listVPCs = json.listvpcsresponse.vpc
|
const listVPCs = json.listvpcsresponse.vpc
|
||||||
var vpcAvailable = this.arrayHasItems(listVPCs)
|
var vpcAvailable = this.arrayHasItems(listVPCs)
|
||||||
@ -337,6 +338,9 @@ export default {
|
|||||||
this.fetchNetworkOfferingData()
|
this.fetchNetworkOfferingData()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
this.fetchNetworkOfferingData(false)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fetchNetworkOfferingData (forVpc) {
|
fetchNetworkOfferingData (forVpc) {
|
||||||
|
|||||||
@ -317,6 +317,7 @@ export default {
|
|||||||
} else { // from guest network section
|
} else { // from guest network section
|
||||||
var params = {}
|
var params = {}
|
||||||
this.networkOfferingLoading = true
|
this.networkOfferingLoading = true
|
||||||
|
if ('listVPCs' in this.$store.getters.apis) {
|
||||||
api('listVPCs', params).then(json => {
|
api('listVPCs', params).then(json => {
|
||||||
const listVPCs = json.listvpcsresponse.vpc
|
const listVPCs = json.listvpcsresponse.vpc
|
||||||
var vpcAvailable = this.arrayHasItems(listVPCs)
|
var vpcAvailable = this.arrayHasItems(listVPCs)
|
||||||
@ -326,6 +327,9 @@ export default {
|
|||||||
this.fetchNetworkOfferingData()
|
this.fetchNetworkOfferingData()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
this.fetchNetworkOfferingData(false)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fetchNetworkOfferingData (forVpc) {
|
fetchNetworkOfferingData (forVpc) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user