Skip to content

Commit a876a57

Browse files
committed
CLOUDSTACK-3337: Don't show current ACL list in dropdown
1 parent 0fc47c2 commit a876a57

2 files changed

Lines changed: 20 additions & 13 deletions

File tree

ui/modules/vpc/vpc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
complete: function($panel) {
9090
var $detailView = $('<div>').detailView(
9191
$.extend(true, {}, cloudStack.vpc.tiers.detailView, {
92+
section: 'networks',
9293
$browser: $browser,
9394
context: context,
9495
onActionComplete: function() {

ui/scripts/vpc.js

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2892,9 +2892,15 @@
28922892
success: function(json) {
28932893
var objs = json.listnetworkacllistsresponse.networkacllist;
28942894
var items = [];
2895+
28952896
$(objs).each(function() {
2896-
2897+
if (this.id == args.context.networks[0].aclid) {
2898+
return true;
2899+
}
2900+
28972901
items.push({id: this.id, description: this.name});
2902+
2903+
return true;
28982904
});
28992905
args.response.success({data: items});
29002906
}
@@ -2905,23 +2911,23 @@
29052911
},
29062912
action: function(args) {
29072913
$.ajax({
2908-
url: createURL("replaceNetworkACLList&networkid=" + args.context.networks[0].id + "&aclid=" + args.data.aclid ),
2914+
url: createURL("replaceNetworkACLList&networkid=" + args.context.networks[0].id + "&aclid=" + args.data.aclid),
29092915
dataType: "json",
29102916
success: function(json) {
29112917
var jid = json.replacenetworkacllistresponse.jobid;
2912-
args.response.success(
2918+
2919+
args.response.success({
2920+
_custom: {
2921+
jobId: jid,
2922+
getUpdatedItem: function(json) {
2923+
var network = args.context.networks[0];
29132924

2914-
{_custom:
2915-
{
2916-
jobId: jid,
2917-
getUpdatedItem: function(json) {
2918-
var item = json.queryasyncjobresultresponse.jobresult.aclid;
2919-
return {data: item};
2920-
}
2921-
}
2925+
network.aclid = args.data.aclid;
2926+
2927+
return { aclid: args.data.aclid };
2928+
}
29222929
}
2923-
2924-
)
2930+
});
29252931
},
29262932

29272933
error: function(json){

0 commit comments

Comments
 (0)