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:53:18 UTC
[3/3] git commit: updated refs/heads/master to 9e5449c
VPC JS: Code cleanup
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0fc47c21
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0fc47c21
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0fc47c21
Branch: refs/heads/master
Commit: 0fc47c215f674b028ebf7071bffce9c983687f90
Parents: 833c83d
Author: Brian Federle <br...@citrix.com>
Authored: Mon Jul 8 14:28:07 2013 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Mon Jul 8 15:53:14 2013 -0700
----------------------------------------------------------------------
ui/scripts/vpc.js | 197 +++++++++++++++++++++++++------------------------
1 file changed, 99 insertions(+), 98 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0fc47c21/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index cf2d9c2..40a375c 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -1971,35 +1971,37 @@
}
},
- replaceACL:{
- label:'Replace ACL',
- createForm:{
- title:'Replace ACL',
- label:'Replace ACL',
- fields:{
- aclid:{
- label:'ACL',
- select:function(args){
- $.ajax({
- url: createURL('listNetworkACLLists'),
- dataType: 'json',
- async: true,
- success: function(json) {
- var objs = json.listnetworkacllistsresponse.networkacllist;
- var items = [];
- $(objs).each(function() {
-
- items.push({id: this.id, description: this.name});
- });
- args.response.success({data: items});
- }
- });
+ replaceACL: {
+ label: 'Replace ACL',
+ createForm: {
+ title: 'Replace ACL',
+ label: 'Replace ACL',
+ fields: {
+ aclid: {
+ label: 'ACL',
+ select: function(args){
+ $.ajax({
+ url: createURL('listNetworkACLLists'),
+ dataType: 'json',
+ async: true,
+ success: function(json) {
+ var objs = json.listnetworkacllistsresponse.networkacllist;
+ var items = [];
+
+ $(objs).each(function() {
+ items.push({
+ id: this.id, description: this.name
+ });
+ });
+ args.response.success({data: items});
+ }
+ });
+ }
+ }
}
- }
- }
- },
-
- action: function(args) {
+ },
+
+ action: function(args) {
$.ajax({
url: createURL("replaceNetworkACLList&gatewayid=" + args.context.vpcGateways[0].id + "&aclid=" + args.data.aclid ),
dataType: "json",
@@ -2007,31 +2009,31 @@
var jid = json.replacenetworkacllistresponse.jobid;
args.response.success(
- {_custom:
+ {_custom:
{
jobId: jid,
getUpdatedItem: function(json) {
var item = json.queryasyncjobresultresponse.jobresult.aclid;
- return {data:item};
+ return {data: item};
}
}
}
- )
+ )
},
- error:function(json){
+ error: function(json){
- args.response.error(parseXMLHttpResponse(json));
- }
+ args.response.error(parseXMLHttpResponse(json));
+ }
});
},
- notification: {
- poll: pollAsyncJobResult
- },
+ notification: {
+ poll: pollAsyncJobResult
+ },
- messages: {
+ messages: {
confirm: function(args) {
return 'Do you want to replace the ACL with a new one ?';
},
@@ -2039,7 +2041,7 @@
return 'ACL replaced';
}
}
- }
+ }
},
tabs: {
details: {
@@ -2874,74 +2876,73 @@
}
},
- replaceacllist:{
-
- label:'Replace ACL List',
- createForm:{
- title:'Replace ACL List',
- label:'Replace ACL List',
- fields:{
- aclid:{
- label:'ACL',
- select:function(args){
- $.ajax({
- url: createURL('listNetworkACLLists&vpcid=' + args.context.vpc[0].id),
- dataType: 'json',
- async: true,
- success: function(json) {
- var objs = json.listnetworkacllistsresponse.networkacllist;
- var items = [];
- $(objs).each(function() {
+ replaceacllist: {
+ label: 'Replace ACL List',
+ createForm: {
+ title: 'Replace ACL List',
+ label: 'Replace ACL List',
+ fields: {
+ aclid: {
+ label: 'ACL',
+ select: function(args){
+ $.ajax({
+ url: createURL('listNetworkACLLists&vpcid=' + args.context.vpc[0].id),
+ dataType: 'json',
+ async: true,
+ success: function(json) {
+ var objs = json.listnetworkacllistsresponse.networkacllist;
+ var items = [];
+ $(objs).each(function() {
items.push({id: this.id, description: this.name});
- });
- args.response.success({data: items});
- }
- });
- }
+ });
+ args.response.success({data: items});
+ }
+ });
+ }
}
}
- },
- action: function(args) {
- $.ajax({
- 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(
+ },
+ action: function(args) {
+ $.ajax({
+ 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(
- {_custom:
- {
- jobId: jid,
- getUpdatedItem: function(json) {
- var item = json.queryasyncjobresultresponse.jobresult.aclid;
- return {data:item};
- }
- }
- }
+ {_custom:
+ {
+ jobId: jid,
+ getUpdatedItem: function(json) {
+ var item = json.queryasyncjobresultresponse.jobresult.aclid;
+ return {data: item};
+ }
+ }
+ }
- )
- },
+ )
+ },
- error:function(json){
+ error: function(json){
- args.response.error(parseXMLHttpResponse(json));
- }
- });
- },
- notification: {
- poll: pollAsyncJobResult
- },
+ args.response.error(parseXMLHttpResponse(json));
+ }
+ });
+ },
+ notification: {
+ poll: pollAsyncJobResult
+ },
- messages: {
- confirm: function(args) {
- return 'Do you want to replace the ACL with a new one ?';
- },
- notification: function(args) {
- return 'ACL replaced';
- }
- }
- }
+ messages: {
+ confirm: function(args) {
+ return 'Do you want to replace the ACL with a new one ?';
+ },
+ notification: function(args) {
+ return 'ACL replaced';
+ }
+ }
+ }
},
tabFilter: function(args) {