cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pran...@apache.org
Subject [33/50] git commit: updated refs/heads/master to b03e419
Date Tue, 28 May 2013 07:59:18 GMT
Add dashboard counts for private gateways, ip addresses and vpns


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

Branch: refs/heads/master
Commit: f2dd65c39771ed2ba7a1248351a8d8bd3fb4af03
Parents: 7ac0141
Author: Brian Federle <bfederle@gmail.com>
Authored: Wed May 22 12:01:22 2013 -0700
Committer: Brian Federle <bfederle@gmail.com>
Committed: Wed May 22 12:01:22 2013 -0700

----------------------------------------------------------------------
 ui/scripts/vpc.js |   59 +++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 49 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f2dd65c3/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index f334735..a9e839c 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -3106,16 +3106,16 @@
           async: true,
           success: function(json) {
             var networks = json.listnetworksresponse.network;
-            var loadBalancers, networkACLLists;
+            var loadBalancers, networkACLLists, publicIpAddresses, privateGateways, vpnGateways;
             var error = false;
 
             // Get load balancers
             $.ajax({
               url: createURL('listLoadBalancers'),
-              data: { details: 'min', vpcid: args.context.vpc[0].id },
+              data: { vpcid: args.context.vpc[0].id },
               success: function(json) {
                 loadBalancers = json.listloadbalancerssresponse.loadbalancer ?
-                  json.listloadbalancerssresponse.loadbalancer : []
+                  json.listloadbalancerssresponse.loadbalancer : [];
               },
               error: function(json) {
                 error = true;
@@ -3125,18 +3125,57 @@
             // Get network ACL lists
             $.ajax({
               url: createURL('listNetworkACLLists'),
-              data: { details: 'min', 'vpc_id': args.context.vpc[0].id },
+              data: { 'vpc_id': args.context.vpc[0].id },
               success: function(json) {
                 networkACLLists = json.listnetworkacllistsresponse.networkacllist ?
-                  json.listnetworkacllistsresponse.networkacllist : []
+                  json.listnetworkacllistsresponse.networkacllist : [];
               },
               error: function(json) {
                 error = true;
               }
-            });            
+            });
+
+            // Get public IPs
+            $.ajax({
+              url: createURL('listPublicIpAddresses'),
+              data: { 'vpcid': args.context.vpc[0].id },
+              success: function(json) {
+                publicIpAddresses = json.listpublicipaddressesresponse.publicipaddress ?
+                  json.listpublicipaddressesresponse.publicipaddress : [];
+              },
+              error: function(json) {
+                error = true;
+              }
+            });
+
+            // Get private gateways
+            $.ajax({
+              url: createURL('listPrivateGateways'),
+              data: { 'vpcid': args.context.vpc[0].id },
+              success: function(json) {
+                privateGateways = json.listprivategatewaysresponse.privategateway ?
+                  json.listprivategatewaysresponse.privategateway : [];
+              },
+              error: function(json) {
+                error = true;
+              }
+            });
+
+            // Get VPN gateways
+            $.ajax({
+              url: createURL('listVpnGateways'),
+              data: { 'vpcid': args.context.vpc[0].id },
+              success: function(json) {
+                vpnGateways = json.listvpngatewaysresponse.vpngateway ?
+                  json.listvpngatewaysresponse.vpngateway : [];
+              },
+              error: function(json) {
+                error = true;
+              }
+            });
 
             var dataTimer = setInterval(function() {
-              var complete = loadBalancers && networkACLLists;
+              var complete = loadBalancers && networkACLLists && publicIpAddresses
&& privateGateways && vpnGateways;
               
               if (complete) {
                 clearInterval(dataTimer);
@@ -3162,17 +3201,17 @@
                     {
                       id: 'privateGateways',
                       name: 'Private gateways',
-                      total: 0
+                      total: privateGateways.length
                     },
                     {
                       id: 'publicIPs',
                       name: 'Public IP addresses',
-                      total: 0
+                      total: publicIpAddresses.length
                     },
                     {
                       id: 'siteToSiteVPNs',
                       name: 'Site-to-site VPNs',
-                      total: 0
+                      total: vpnGateways.length
                     },
                     {
                       id: 'networkACLLists',


Mime
View raw message