mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	IP Address page - detail view - configuration tab - use a network's networkOffering's services instead of network's own services to determine whether or not to cross out/disable Firewall, Port Forwarding, Load Balancing icon in configuration chart.
This commit is contained in:
		
							parent
							
								
									9c14506043
								
							
						
					
					
						commit
						9abf040ffa
					
				| @ -1299,22 +1299,32 @@ | ||||
| 										if (args.context.ipAddresses[0].isstaticnat)   | ||||
| 										  disallowedActions.push("nonStaticNATChart");  //tell ipRules widget to show staticNAT chart instead of non-staticNAT chart.									
 | ||||
| 										       | ||||
| 										var networkHavingFirewallService = false;										 | ||||
| 										var networkHavingPortForwardingService = false; | ||||
| 										var networkHavingLbService = false;																				 | ||||
| 										$(args.context.networks[0].service).each(function(){												  | ||||
| 											if(this.name == "Firewall")  | ||||
| 												networkHavingFirewallService = true;		 | ||||
| 											if(this.name == "PortForwarding") | ||||
| 											  networkHavingPortForwardingService = true; | ||||
| 											if(this.name == "Lb") | ||||
| 											  networkHavingLbService = true;											 | ||||
| 													 | ||||
| 										var networkOfferingHavingFirewallService = false; | ||||
| 										var networkOfferingHavingPortForwardingService = false; | ||||
| 										var networkOfferingHavingLbService = false; | ||||
| 										$.ajax({ | ||||
| 											url: createURL("listNetworkOfferings&id=" + args.context.networks[0].networkofferingid), | ||||
| 											dataType: "json", | ||||
| 											async: false, | ||||
| 											success: function(json) {								   | ||||
| 												var networkoffering = json.listnetworkofferingsresponse.networkoffering[0];		 | ||||
| 												$(networkoffering.service).each(function(){								  | ||||
| 													var thisService = this;																 | ||||
|                           if(thisService.name == "Firewall")  | ||||
| 														networkOfferingHavingFirewallService = true;				 | ||||
|                           if(thisService.name == "PortForwarding")  | ||||
| 														networkOfferingHavingPortForwardingService = true;																 | ||||
| 													if(thisService.name == "Lb")  | ||||
| 														networkOfferingHavingLbService = true;	 | ||||
| 												});											 | ||||
| 										if(networkHavingFirewallService == false)  | ||||
| 											} | ||||
| 										});										 | ||||
| 										if(networkOfferingHavingFirewallService == false)  | ||||
| 										  disallowedActions.push("firewall"); 	 | ||||
| 										if(networkHavingPortForwardingService == false)  | ||||
| 										if(networkOfferingHavingPortForwardingService == false)  | ||||
| 										  disallowedActions.push("portForwarding"); | ||||
| 										if(networkHavingLbService == false)  | ||||
| 										if(networkOfferingHavingLbService == false)  | ||||
| 										  disallowedActions.push("loadBalancing");																					 | ||||
| 									 | ||||
|                     return disallowedActions; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user