CLOUDSTACK-3337: Don't show current ACL list in dropdown

This commit is contained in:
Brian Federle 2013-07-08 15:23:15 -07:00
parent 0fc47c215f
commit a876a575dd
2 changed files with 20 additions and 13 deletions

View File

@ -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() {

View File

@ -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){