You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/07/09 00:58:19 UTC
[2/3] git commit: updated refs/heads/4.2 to 40cac19
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/18b107b0
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/18b107b0
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/18b107b0
Branch: refs/heads/4.2
Commit: 18b107b062f9ae5ab6ef83c5abe13d9c0f774085
Parents: e535760
Author: Brian Federle <br...@citrix.com>
Authored: Mon Jul 8 15:23:15 2013 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Mon Jul 8 15:56:31 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/18b107b0/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/18b107b0/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index 4d3ec7a..9ea5a82 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -2885,9 +2885,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});
}
@@ -2898,23 +2904,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){