From 1fc67e49909a9e1c0d01f25d09cefaa94cd254e0 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Thu, 19 Jul 2012 16:55:30 -0700 Subject: [PATCH] cloudstack 3.0 UI - site to site VPN - VPN Gateway - implement Delete VPN Gateway action. --- ui/scripts/vpc.js | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js index de900134de0..290695d3628 100644 --- a/ui/scripts/vpc.js +++ b/ui/scripts/vpc.js @@ -713,6 +713,40 @@ }, detailView: { name: 'label.details', + actions: { + remove: { + label: 'delete VPN Gateway', + messages: { + confirm: function(args) { + return 'Please confirm that you want to delete this VPN Gateway'; + }, + notification: function(args) { + return 'delete VPN Gateway'; + } + }, + action: function(args) { + $.ajax({ + url: createURL("deleteVpnGateway"), + data: { + id: args.context.vpnGateway[0].id + }, + success: function(json) { + var jid = json.deletevpngatewayresponse.jobid; + args.response.success( + {_custom: + { + jobId: jid + } + } + ); + } + }); + }, + notification: { + poll: pollAsyncJobResult + } + } + }, tabs: { details: { title: 'label.details',