diff --git a/ui/modules/vpc/vpc.js b/ui/modules/vpc/vpc.js index 981d612b520..fb7320d0ab4 100644 --- a/ui/modules/vpc/vpc.js +++ b/ui/modules/vpc/vpc.js @@ -89,6 +89,7 @@ complete: function($panel) { var $detailView = $('
').detailView( $.extend(true, {}, cloudStack.vpc.tiers.detailView, { + section: 'networks', $browser: $browser, context: context, onActionComplete: function() { diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js index 40a375c0929..b93328f0b49 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){