cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject git commit: updated refs/heads/ui-vpc-redesign to 531a2f7
Date Tue, 21 May 2013 23:28:59 GMT
Updated Branches:
  refs/heads/ui-vpc-redesign a3e97bbc3 -> 531a2f713


Add ACL lists count to VPC chart


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

Branch: refs/heads/ui-vpc-redesign
Commit: 531a2f713f6cf8712b2f0def45e6a95cc9128e97
Parents: a3e97bb
Author: Brian Federle <bfederle@gmail.com>
Authored: Tue May 21 16:28:57 2013 -0700
Committer: Brian Federle <bfederle@gmail.com>
Committed: Tue May 21 16:28:57 2013 -0700

----------------------------------------------------------------------
 ui/scripts/vpc.js |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/531a2f71/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index e5ba231..bf136b8 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -3084,7 +3084,7 @@
           async: true,
           success: function(json) {
             var networks = json.listnetworksresponse.network;
-            var loadBalancers;
+            var loadBalancers, networkACLLists;
             var error = false;
 
             // Get load balancers
@@ -3100,8 +3100,21 @@
               }
             });
 
+            // Get network ACL lists
+            $.ajax({
+              url: createURL('listNetworkACLLists'),
+              data: { details: 'min', 'vpc_id': args.context.vpc[0].id },
+              success: function(json) {
+                networkACLLists = json.listnetworkacllistsresponse.networkacllist ?
+                  json.listnetworkacllistsresponse.networkacllist : []
+              },
+              error: function(json) {
+                error = true;
+              }
+            });            
+
             var dataTimer = setInterval(function() {
-              var complete = loadBalancers;
+              var complete = loadBalancers && networkACLLists;
               
               if (complete) {
                 clearInterval(dataTimer);
@@ -3142,7 +3155,7 @@
                     {
                       id: 'networkACLLists',
                       name: 'Network ACL lists',
-                      total: 0
+                      total: networkACLLists.length
                     }
                   ],
                   tiers: $(networks).map(function(index, tier) {


Mime
View raw message