You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by pr...@apache.org on 2012/07/31 00:17:28 UTC
git commit: CS-15720:Site 2 Site VPN:Front End development for adding
a vpn conenction from vpn connection page
Updated Branches:
refs/heads/vpc f763f53c2 -> 5f2bbf0e2
CS-15720:Site 2 Site VPN:Front End development for adding a vpn conenction from vpn connection page
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/5f2bbf0e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/5f2bbf0e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/5f2bbf0e
Branch: refs/heads/vpc
Commit: 5f2bbf0e2a65b44d2e02539ce873b2bc1aac8a30
Parents: f763f53
Author: Pranav Saxena <pr...@citrix.com>
Authored: Tue Jul 31 03:46:45 2012 +0530
Committer: Pranav Saxena <pr...@citrix.com>
Committed: Tue Jul 31 03:46:45 2012 +0530
----------------------------------------------------------------------
ui/scripts/vpc.js | 69 +++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 68 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/5f2bbf0e/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index d9eeab8..aa1e8d9 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -892,7 +892,74 @@
}
});
},
-
+ actions:{
+ add: {
+ label:'add VPN connection',
+ messages: {
+ notification:function(args) {
+ return 'add VPN connection';
+ },
+ createForm: {
+ title:'add VPN connection',
+ fields: {
+ zoneid: {
+ label:'Zone',
+ validation:{required:true},
+ select: function(args) {
+ $.ajax({
+ url: createURL('listZones'),
+ data: {
+ available: true
+ },
+ success: function(json) {
+ var zones = json.listzonesresponse.zone;
+ args.response.success({
+ data: $.map(zones, function(zone) {
+ return {
+ id: zone.id,
+ description: zone.name
+ };
+ })
+ });
+ }
+ });
+ }
+ },
+ vpcid:{
+ label:'VPC',
+ validation:{ required:true},
+ dependsOn: 'zoneid',
+ select: function(args) {
+ $.ajax({
+ url: createURL('listVPCs'),
+ data: {
+ zoneid: args.zoneid,
+ listAll: true
+ },
+ success: function(json) {
+ var items = json.listvpcsresponse.vpc;
+ var data;
+ if(items != null && items.length > 0) {
+ data = $.map(items, function(item) {
+ return {
+ id: item.id,
+ description: item.name
+ }
+ });
+ }
+ args.response.success({ data: data });
+ }
+ });
+ }
+ }
+ }
+ },
+ action:function(args) {
+ // Code for passing the customer gateway ID and VPN id
+ // Server side Integration code
+ }
+ }
+ },
detailView: {
name: 'label.details',
tabs: {