Updated Branches:
  refs/heads/master bcc5baa16 -> 5233e3216

CLOUDSTACK-869:Netscaler support as an external LB provider


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

Branch: refs/heads/master
Commit: 5233e3216b11e69c7c7e051f0a6c3d0c6bf98803
Parents: bcc5baa
Author: Pranav Saxena <pranav.sax...@citrix.com>
Authored: Fri Jun 7 16:53:32 2013 +0530
Committer: Pranav Saxena <pranav.sax...@citrix.com>
Committed: Fri Jun 7 16:53:32 2013 +0530

----------------------------------------------------------------------
 ui/scripts/network.js |   25 +++++++++++++++++--------
 1 files changed, 17 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5233e321/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index a3e239b..9e60cbc 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -4536,20 +4536,29 @@
                   loadbalancer:{        //Support for Netscaler as an external 
device for load balancing
                     label:'Load Balancer',
                     select:function(args){
+                         $.ajax({
+                          url:createURL('listVPCOfferings&listall=true'),
+                          dataType:'json',
+                          success:function(json){
+                        var items=[];
+                        var vpcObj = json.listvpcofferingsresponse.vpcoffering;
+                        $(vpcObj).each(function(){
+                          items.push({id:this.id , description:this.name});
+                          });
+                        args.response.success({data:items});
 
-                        var items = [];
-                        items.push({id:'vpcvirtualrouter' , description:'VPC 
Virtual Router'});
-                        items.push({id:'netscaler' , description:'NetScaler'});
+                         }
 
-                        args.response.success({data:items});
-                  }
+                     });
+
+                   }
 
                 }
 
                 }
               },              
               action: function(args) {                                         
                                
-                                                               var 
defaultvpcofferingid;
+                                               /*              var 
defaultvpcofferingid;
                                                                $.ajax({
                                                                  url: 
createURL("listVPCOfferings"),
                                                                        
dataType: "json",
@@ -4560,14 +4569,14 @@
                                                                        
success: function(json) {
                                                                          
defaultvpcofferingid = json.listvpcofferingsresponse.vpcoffering[0].id;
                                                                        }
-                                                               });
+                                                               });*/
                                                                
                                                                var dataObj = {
                                                                        name: 
args.data.name,
                                                                        
displaytext: args.data.displaytext,
                                                                        zoneid: 
args.data.zoneid,
                                                                        cidr: 
args.data.cidr,
-                                                                       
vpcofferingid: defaultvpcofferingid
+                                                                       
vpcofferingid: args.data.loadbalancer    // Support for external load balancer
                                                                };
                                                                
                                                                
if(args.data.networkdomain != null && args.data.networkdomain.length > 0)

Reply via email to