cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pran...@apache.org
Subject [41/50] git commit: updated refs/heads/master to b03e419
Date Tue, 28 May 2013 07:59:26 GMT
CLOUDSTACK-747: UI - VPC tier - implement count of Public LB IP.


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

Branch: refs/heads/master
Commit: bc7d7e64c0f4cbcf3960b2387caa7cfff88e9c77
Parents: d515602
Author: Jessica Wang <jessicawang@apache.org>
Authored: Thu May 23 11:39:27 2013 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Thu May 23 11:39:27 2013 -0700

----------------------------------------------------------------------
 ui/scripts/vpc.js |   37 +++++++++++++++++++++++++------------
 1 files changed, 25 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bc7d7e64/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index 923c510..ae3001a 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -582,10 +582,10 @@
           }              
         }
       },
-      publicLoadBalancers: {
+      publicLbIps: {
         title: 'Public LB',
         listView: {
-          id: 'publicLoadBalancers',
+          id: 'publicLbIps',
           fields: {
             ipaddress: { label: 'label.ip.address' },
             type: { label: 'label.type' }
@@ -3268,7 +3268,7 @@
                 }
               ],
               tiers: $(networks).map(function(index, tier) {
-                var internalLoadBalancers, publicLoadBalancers, virtualMachines, staticNatIps;
+                var internalLoadBalancers, publicLbIps, virtualMachines, staticNatIps;
 
                 // Get internal load balancers
                 $.ajax({
@@ -3283,19 +3283,19 @@
                   }
                 });
 
-                // Get VMs
+                // Get Public LB IPs
                 $.ajax({
-                  url: createURL('listVirtualMachines'),
+                  url: createURL('listPublicIpAddresses'),
                   async: false,
-                  data: { networkid: tier.id },
+                  data: { networkid: tier.id, forloadbalancing: true },
                   success: function(json) {
-                    virtualMachines = json.listvirtualmachinesresponse;
+                    publicLbIps = json.listpublicipaddressesresponse;
                   },
                   error: function(json) {
                     error = true;
                   }
-                });
-
+                });            
+                
                 // Get static NAT IPs
                 $.ajax({
                   url: createURL('listPublicIpAddresses'),
@@ -3309,6 +3309,19 @@
                   }
                 });                
                 
+                // Get VMs
+                $.ajax({
+                  url: createURL('listVirtualMachines'),
+                  async: false,
+                  data: { networkid: tier.id },
+                  success: function(json) {
+                    virtualMachines = json.listvirtualmachinesresponse;
+                  },
+                  error: function(json) {
+                    error = true;
+                  }
+                });
+                
                 return $.extend(tier, {
                   _dashboardItems: [
                     {
@@ -3317,9 +3330,9 @@
                       total: internalLoadBalancers.count
                     },
                     {
-                      id: 'publicLoadBalancers',
-                      name: 'Public LB',
-                      total: 0
+                      id: 'publicLbIps',
+                      name: 'Public LB IP',
+                      total: publicLbIps.count
                     },
                     {
                       id: 'tierStaticNATs',


Mime
View raw message