From fb4e67c1406fa0333663b6a726f283a7142c58a9 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Thu, 24 Feb 2011 11:26:58 -0800 Subject: [PATCH] IP Address page - source Nat ip address - hide LB tab if the LB service has "LoadBalancingSupportedIps" capability (meaning it's using external load balancer). --- ui/scripts/cloud.core.ipaddress.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ui/scripts/cloud.core.ipaddress.js b/ui/scripts/cloud.core.ipaddress.js index 8cf3a81f10f..5df6365a719 100644 --- a/ui/scripts/cloud.core.ipaddress.js +++ b/ui/scripts/cloud.core.ipaddress.js @@ -482,8 +482,18 @@ function ipToRightPanel($midmenuItem1) { } //Load Balancer tab - if (ipObj.issourcenat == true) { - $("#tab_load_balancer").hide(); + if (ipObj.issourcenat == true) { + var lbServiceObj = ipFindNetworkServiceByName("Lb", networkObj); + if(lbServiceObj != null) { + var LoadBalancingSupportedIpsCapabilityObj = ipFindCapabilityByName("LoadBalancingSupportedIps", lbServiceObj); + if(LoadBalancingSupportedIpsCapabilityObj != null) + $("#tab_load_balancer").hide(); + else + $("#tab_load_balancer").show(); + } + else { + $("#tab_load_balancer").hide(); + } } else { if(networkObj != null) {