Updated Branches:
  refs/heads/master 58b57ca5d -> 96a92a23e

Code structure problem while filter out lbschemes


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/96a92a23
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/96a92a23
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/96a92a23

Branch: refs/heads/master
Commit: 96a92a23ec0dc1121af2fce83173d0ede9d4cac1
Parents: 58b57ca
Author: Pranav Saxena <pranav.sax...@citrix.com>
Authored: Thu Jun 6 16:15:14 2013 +0530
Committer: Pranav Saxena <pranav.sax...@citrix.com>
Committed: Thu Jun 6 16:15:14 2013 +0530

----------------------------------------------------------------------
 ui/scripts/vpc.js |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/96a92a23/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index 164f2bb..36e3aa0 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -3595,7 +3595,20 @@
                 ).length ? tier._highlighted = true : tier._highlighted = 
false;
 
                 // Get LB capabilities
-                var lbSchemes = $.grep(
+
+              var lbSchemes = $.grep(
+                    tier.service,
+                    function(service) {
+                      return service.name == 'Lb';
+                    }
+                  ).length? $.grep($.grep(
+                    tier.service,
+                    function(service) {
+                      return service.name == 'Lb';
+                    }
+                  )[0].capability,function(capability){ return capability.name 
== 'LbSchemes';}) : [] ;
+
+          /*      var lbSchemes = $.grep(
                   $.grep(
                     tier.service,
                     function(service) {
@@ -3605,7 +3618,7 @@
                   function(capability) {
                     return capability.name == 'LbSchemes';
                   }
-                );
+                );*/
 
                 var hasLbScheme = function(schemeVal) {
                   return $.grep(

Reply via email to