cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [1/2] git commit: updated refs/heads/4.2 to b79977d
Date Mon, 29 Jul 2013 21:42:49 GMT
Updated Branches:
  refs/heads/4.2 57099c8f8 -> b79977d32
  refs/heads/master 42da3efbc -> a917cbefc


CLOUDSTACK-3337: Fix replace ACL drop-down for private gateway


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

Branch: refs/heads/4.2
Commit: b79977d328e50de781adecb8fa55dce91d6d3157
Parents: 57099c8
Author: Brian Federle <brian.federle@citrix.com>
Authored: Mon Jul 29 14:42:11 2013 -0700
Committer: Brian Federle <brian.federle@citrix.com>
Committed: Mon Jul 29 14:42:18 2013 -0700

----------------------------------------------------------------------
 ui/css/cloudstack3.css |  6 ++++--
 ui/scripts/vpc.js      | 36 ++++++++++++++++++++++++++++++++++--
 2 files changed, 38 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b79977d3/ui/css/cloudstack3.css
----------------------------------------------------------------------
diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css
index 50cfbd4..afebbd1 100644
--- a/ui/css/cloudstack3.css
+++ b/ui/css/cloudstack3.css
@@ -11940,14 +11940,16 @@ div.ui-dialog div.autoscaler div.field-group div.form-container
form div.form-it
 .downloadVolume .icon,
 .downloadTemplate .icon,
 .downloadISO .icon,
-.replaceacllist .icon {
+.replaceacllist .icon,
+.replaceACL .icon {
   background-position: -35px -125px;
 }
 
 .downloadVolume:hover .icon,
 .downloadTemplate:hover .icon,
 .downloadISO:hover .icon,
-.replaceacllist:hover .icon {
+.replaceacllist:hover .icon,
+.replaceACL:hover .icon {
   background-position: -35px -707px;
 }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b79977d3/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index 669d70c..39ed997 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -2256,6 +2256,9 @@
                                                 select: function(args) {
                                                     $.ajax({
                                                         url: createURL('listNetworkACLLists'),
+                                                        data: {
+                                                            vpcid: args.context.vpc[0].id
+                                                        },
                                                         dataType: 'json',
                                                         async: true,
                                                         success: function(json) {
@@ -2263,11 +2266,18 @@
                                                             var items = [];
 
                                                             $(objs).each(function() {
+                                                                if (this.id == args.context.vpcGateways[0].aclid)
{
+                                                                    return true;
+                                                                }
+                                                                
                                                                 items.push({
                                                                     id: this.id,
                                                                     description: this.name
                                                                 });
+
+                                                                return true;
                                                             });
+                                                            
                                                             args.response.success({
                                                                 data: items
                                                             });
@@ -2292,7 +2302,7 @@
                                                             getUpdatedItem: function(json)
{
                                                                 var item = json.queryasyncjobresultresponse.jobresult.aclid;
                                                                 return {
-                                                                    data: item
+                                                                    aclid: args.data.aclid
                                                                 };
                                                             }
                                                         }
@@ -2360,8 +2370,11 @@
                                                 return str ? 'Yes' : 'No';
                                             }
                                         },
+                                        aclName: {
+                                            label: 'ACL Name'
+                                        },
                                         aclid: {
-                                            label: 'ACL id'
+                                            label: 'ACL ID'
                                         }
 
 
@@ -2375,6 +2388,25 @@
                                             },
                                             success: function(json) {
                                                 var item = json.listprivategatewaysresponse.privategateway[0];
+
+
+                                                // Get ACL name
+                                                $.ajax({
+                                                    url: createURL('listNetworkACLLists'),
+                                                    async: false,
+                                                    data: {
+                                                        vpcid: args.context.vpc[0].id
+                                                    },
+                                                    success: function(json) {
+                                                        var objs = json.listnetworkacllistsresponse.networkacllist;
+                                                        var acl = $.grep(objs, function(obj)
{
+                                                            return obj.id === args.context.vpcGateways[0].aclid;
                                                           
+                                                        });
+                                                        
+                                                        item.aclName = acl[0] ? acl[0].name
: 'None';
+                                                    }
+                                                });
+                                                
                                                 args.response.success({
                                                     data: item,
                                                     actionFilter: function(args) {


Mime
View raw message