CS-16002: Fix ACL list view when no networks present

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

Branch: refs/heads/4.0
Commit: b676c04213b3e56500fd37fab8d12e5e2a83dbfa
Parents: ca67f89
Author: Brian Federle <[email protected]>
Authored: Thu Aug 16 14:07:55 2012 -0700
Committer: Alex Huang <[email protected]>
Committed: Thu Aug 16 16:44:01 2012 -0700

----------------------------------------------------------------------
 ui/scripts/vpc.js |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/b676c042/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index 8d79040..c046f28 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -553,8 +553,11 @@
                 vpcid: args.context.vpc[0].id
               },
               success: function(json) {
+                var networks = json.listnetworksresponse.network ?
+                  json.listnetworksresponse.network : [];
+
                 args.response.success({
-                  data: $.map(json.listnetworksresponse.network, 
function(tier) {
+                  data: $.map(networks, function(tier) {
                     var aclTotal = 0;
                     
                     // Get ACL total

Reply via email to