ui: Network offerings not listed if listVPCs not available in the account Role (#6354)

This commit is contained in:
Pearl Dsilva 2022-05-05 07:44:47 +05:30 committed by GitHub
parent efb1f2b719
commit 556f9dac0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 18 deletions

View File

@ -328,6 +328,7 @@ export default {
} else { // from guest network section
var params = {}
this.networkOfferingLoading = true
if ('listVPCs' in this.$store.getters.apis) {
api('listVPCs', params).then(json => {
const listVPCs = json.listvpcsresponse.vpc
var vpcAvailable = this.arrayHasItems(listVPCs)
@ -337,6 +338,9 @@ export default {
this.fetchNetworkOfferingData()
}
})
} else {
this.fetchNetworkOfferingData(false)
}
}
},
fetchNetworkOfferingData (forVpc) {

View File

@ -317,6 +317,7 @@ export default {
} else { // from guest network section
var params = {}
this.networkOfferingLoading = true
if ('listVPCs' in this.$store.getters.apis) {
api('listVPCs', params).then(json => {
const listVPCs = json.listvpcsresponse.vpc
var vpcAvailable = this.arrayHasItems(listVPCs)
@ -326,6 +327,9 @@ export default {
this.fetchNetworkOfferingData()
}
})
} else {
this.fetchNetworkOfferingData(false)
}
}
},
fetchNetworkOfferingData (forVpc) {