cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [2/3] git commit: updated refs/heads/master to 9e5449c
Date Mon, 08 Jul 2013 22:53:17 GMT
CLOUDSTACK-3337: Don't show current ACL list in dropdown


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

Branch: refs/heads/master
Commit: a876a575dd75e5d444fdcac9f26bd2437339f927
Parents: 0fc47c2
Author: Brian Federle <brian.federle@citrix.com>
Authored: Mon Jul 8 15:23:15 2013 -0700
Committer: Brian Federle <brian.federle@citrix.com>
Committed: Mon Jul 8 15:53:14 2013 -0700

----------------------------------------------------------------------
 ui/modules/vpc/vpc.js |  1 +
 ui/scripts/vpc.js     | 32 +++++++++++++++++++-------------
 2 files changed, 20 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a876a575/ui/modules/vpc/vpc.js
----------------------------------------------------------------------
diff --git a/ui/modules/vpc/vpc.js b/ui/modules/vpc/vpc.js
index 981d612..fb7320d 100644
--- a/ui/modules/vpc/vpc.js
+++ b/ui/modules/vpc/vpc.js
@@ -89,6 +89,7 @@
           complete: function($panel) {
             var $detailView = $('<div>').detailView(
               $.extend(true, {}, cloudStack.vpc.tiers.detailView, {
+                section: 'networks',
                 $browser: $browser,
                 context: context,
                 onActionComplete: function() {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a876a575/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index 40a375c..b93328f 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -2892,9 +2892,15 @@
                       success: function(json) {
                         var objs = json.listnetworkacllistsresponse.networkacllist;
                         var items = [];
+                        
                         $(objs).each(function() {
-
+                          if (this.id == args.context.networks[0].aclid) {
+                            return true;
+                          }
+                          
                           items.push({id: this.id, description: this.name});
+
+                          return true;
                         });
                         args.response.success({data: items});
                       }
@@ -2905,23 +2911,23 @@
             },
             action: function(args) {
               $.ajax({
-                url: createURL("replaceNetworkACLList&networkid=" + args.context.networks[0].id
+ "&aclid=" + args.data.aclid ),
+                url: createURL("replaceNetworkACLList&networkid=" + args.context.networks[0].id
+ "&aclid=" + args.data.aclid),
                 dataType: "json",
                 success: function(json) {
                   var jid = json.replacenetworkacllistresponse.jobid;
-                  args.response.success(
+                  
+                  args.response.success({
+                    _custom: {
+                      jobId: jid,
+                      getUpdatedItem: function(json) {
+                        var network = args.context.networks[0];
 
-                    {_custom: 
-                     {
-                       jobId: jid,
-                       getUpdatedItem: function(json) {
-                         var item = json.queryasyncjobresultresponse.jobresult.aclid;
-                         return {data: item};
-                       }
-                     }
+                        network.aclid = args.data.aclid;
+                        
+                        return { aclid: args.data.aclid };
+                      }
                     }
-
-                  )
+                  });
                 },
 
                 error: function(json){


Mime
View raw message