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,15 +328,19 @@ export default { | ||||
|       } else { // from guest network section | ||||
|         var params = {} | ||||
|         this.networkOfferingLoading = true | ||||
|         api('listVPCs', params).then(json => { | ||||
|           const listVPCs = json.listvpcsresponse.vpc | ||||
|           var vpcAvailable = this.arrayHasItems(listVPCs) | ||||
|           if (vpcAvailable === false) { | ||||
|             this.fetchNetworkOfferingData(false) | ||||
|           } else { | ||||
|             this.fetchNetworkOfferingData() | ||||
|           } | ||||
|         }) | ||||
|         if ('listVPCs' in this.$store.getters.apis) { | ||||
|           api('listVPCs', params).then(json => { | ||||
|             const listVPCs = json.listvpcsresponse.vpc | ||||
|             var vpcAvailable = this.arrayHasItems(listVPCs) | ||||
|             if (vpcAvailable === false) { | ||||
|               this.fetchNetworkOfferingData(false) | ||||
|             } else { | ||||
|               this.fetchNetworkOfferingData() | ||||
|             } | ||||
|           }) | ||||
|         } else { | ||||
|           this.fetchNetworkOfferingData(false) | ||||
|         } | ||||
|       } | ||||
|     }, | ||||
|     fetchNetworkOfferingData (forVpc) { | ||||
|  | ||||
| @ -317,15 +317,19 @@ export default { | ||||
|       } else { // from guest network section | ||||
|         var params = {} | ||||
|         this.networkOfferingLoading = true | ||||
|         api('listVPCs', params).then(json => { | ||||
|           const listVPCs = json.listvpcsresponse.vpc | ||||
|           var vpcAvailable = this.arrayHasItems(listVPCs) | ||||
|           if (vpcAvailable === false) { | ||||
|             this.fetchNetworkOfferingData(false) | ||||
|           } else { | ||||
|             this.fetchNetworkOfferingData() | ||||
|           } | ||||
|         }) | ||||
|         if ('listVPCs' in this.$store.getters.apis) { | ||||
|           api('listVPCs', params).then(json => { | ||||
|             const listVPCs = json.listvpcsresponse.vpc | ||||
|             var vpcAvailable = this.arrayHasItems(listVPCs) | ||||
|             if (vpcAvailable === false) { | ||||
|               this.fetchNetworkOfferingData(false) | ||||
|             } else { | ||||
|               this.fetchNetworkOfferingData() | ||||
|             } | ||||
|           }) | ||||
|         } else { | ||||
|           this.fetchNetworkOfferingData(false) | ||||
|         } | ||||
|       } | ||||
|     }, | ||||
|     fetchNetworkOfferingData (forVpc) { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user