Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5908A961C for ; Tue, 21 May 2013 22:40:02 +0000 (UTC) Received: (qmail 35116 invoked by uid 500); 21 May 2013 22:40:02 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 35099 invoked by uid 500); 21 May 2013 22:40:02 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 35090 invoked by uid 99); 21 May 2013 22:40:02 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 May 2013 22:40:02 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 66870891A5D; Tue, 21 May 2013 22:40:02 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bfederle@apache.org To: commits@cloudstack.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/ui-vpc-redesign to 24dd6fb Date: Tue, 21 May 2013 22:40:02 +0000 (UTC) Updated Branches: refs/heads/ui-vpc-redesign b88da4e1c -> 24dd6fb66 Cleanup formatting Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/24dd6fb6 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/24dd6fb6 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/24dd6fb6 Branch: refs/heads/ui-vpc-redesign Commit: 24dd6fb66ff68c2969364340f72ea9aab5faf58e Parents: b88da4e Author: Brian Federle Authored: Tue May 21 15:40:00 2013 -0700 Committer: Brian Federle Committed: Tue May 21 15:40:00 2013 -0700 ---------------------------------------------------------------------- ui/scripts/vpc.js | 206 ++++++++++++++++++++++++------------------------ 1 files changed, 102 insertions(+), 104 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/24dd6fb6/ui/scripts/vpc.js ---------------------------------------------------------------------- diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js index 50fa5db..450b532 100644 --- a/ui/scripts/vpc.js +++ b/ui/scripts/vpc.js @@ -610,99 +610,97 @@ id: { label: 'id' } }, dataProvider: function(args) { - $.ajax({ - - url:createURL('listNetworkACLLists&vpc_id=' + args.context.vpc[0].id), - success:function(json){ - var items = json.listnetworkacllistsresponse.networkacllist; - - args.response.success({ - data:items + url:createURL('listNetworkACLLists&vpc_id=' + args.context.vpc[0].id), + success:function(json){ + var items = json.listnetworkacllistsresponse.networkacllist; + + args.response.success({ + data:items }); - } - }); + } + }); }, - actions:{ - add:{ - label:'Add ACL List', - createForm:{ + actions:{ + add:{ + label:'Add ACL List', + createForm:{ label: 'Add ACL List', fields:{ name:{label:'ACL List Name',validation:{required:true}}, description:{label:'Description',validation:{required:true}} } }, - messages: { - notification: function(args) { - return 'Add Network ACL List'; - } - }, - action:function(args){ - var data = { - name:args.data.name, - description:args.data.description + messages: { + notification: function(args) { + return 'Add Network ACL List'; + } + }, + action:function(args){ + var data = { + name:args.data.name, + description:args.data.description - }; + }; - $.ajax({ - url:createURL('createNetworkACLList&vpcid='+ args.context.vpc[0].id), - data:data, - success:function(json){ - var items = json.createnetworkacllistresponse; - args.response.success({ - data:items - }); - } - }); + $.ajax({ + url:createURL('createNetworkACLList&vpcid='+ args.context.vpc[0].id), + data:data, + success:function(json){ + var items = json.createnetworkacllistresponse; + args.response.success({ + data:items + }); + } + }); } - } + } }, detailView: { isMaximized: true, - actions:{ - deleteacllist:{ - label:'Delete ACL List', - messages: { - confirm: function(args) { - return 'Are you sure you want to delete this ACL list ?'; - }, - notification: function(args) { - return 'Delete ACL list'; - } - }, - action:function(args){ - $.ajax({ - url:createURL('deleteNetworkACLList&id=' + args.context.aclLists[0].id), - success:function(json){ - var jid = json.deletenetworkacllistresponse.jobid; - args.response.success( - {_custom: - { jobId: jid - } - } - ); - - }, - error:function(json){ - args.response.error(parseXMLHttpResponse(json)); + actions:{ + deleteacllist:{ + label:'Delete ACL List', + messages: { + confirm: function(args) { + return 'Are you sure you want to delete this ACL list ?'; + }, + notification: function(args) { + return 'Delete ACL list'; + } + }, + action:function(args){ + $.ajax({ + url:createURL('deleteNetworkACLList&id=' + args.context.aclLists[0].id), + success:function(json){ + var jid = json.deletenetworkacllistresponse.jobid; + args.response.success( + {_custom: + { jobId: jid + } + } + ); - } - }); - }, - notification: { - poll: pollAsyncJobResult - } + }, + error:function(json){ + args.response.error(parseXMLHttpResponse(json)); - } + } + }); }, + notification: { + poll: pollAsyncJobResult + } + + } + }, tabs: { - details: { + details: { title: 'label.details', fields: [ @@ -714,22 +712,22 @@ ], dataProvider: function(args) { - var items = args.context.aclLists[0]; - args.response.success({ - data: items, - actionFilter: function(args) { - var allowedActions = []; - if(isAdmin()) { - allowedActions.push("deleteacllist"); + var items = args.context.aclLists[0]; + args.response.success({ + data: items, + actionFilter: function(args) { + var allowedActions = []; + if(isAdmin()) { + allowedActions.push("deleteacllist"); - } - return allowedActions; - } + } + return allowedActions; + } - }); + }); } - }, + }, aclRules: { title: 'ACL List Rules', @@ -740,32 +738,32 @@ networkid: false }, dataProvider: function(args) { - $.ajax({ - url:createURL('listNetworkACLs&aclid=' + args.context.aclLists[0].id), - success:function(json){ + $.ajax({ + url:createURL('listNetworkACLs&aclid=' + args.context.aclLists[0].id), + success:function(json){ var items = json.listnetworkaclsresponse.networkacl; - args.response.success({ - data:items - /* { - cidrlist: '10.1.1.0/24', - protocol: 'TCP', - startport: 22, endport: 22, - networkid: 0, - traffictype: 'Egress' - }, - { - cidrlist: '10.2.1.0/24', - protocol: 'UDP', - startport: 56, endport: 72, - networkid: 0, - trafficType: 'Ingress' - } - ]*/ + args.response.success({ + data:items + /* { + cidrlist: '10.1.1.0/24', + protocol: 'TCP', + startport: 22, endport: 22, + networkid: 0, + traffictype: 'Egress' + }, + { + cidrlist: '10.2.1.0/24', + protocol: 'UDP', + startport: 56, endport: 72, + networkid: 0, + trafficType: 'Ingress' + } + ]*/ + }); + } }); - } - }); - } + } })); } }