From 56bbb6c5ae26c8ca2cf77c7a8f1ef5f344c3c5d2 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Thu, 19 Jul 2012 16:45:35 -0700 Subject: [PATCH] cloudstack 3.0 UI - VPN Customer Gateway - implement Delete VPN Customer Gateway action. --- ui/scripts/network.js | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/ui/scripts/network.js b/ui/scripts/network.js index 63aadd45a88..4eeb5a08404 100644 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -3895,6 +3895,42 @@ detailView: { name: 'label.details', + + actions: { + remove: { + label: 'delete VPN Customer Gateway', + messages: { + confirm: function(args) { + return 'Please confirm that you want to delete this VPN Customer Gateway'; + }, + notification: function(args) { + return 'delete VPN Customer Gateway'; + } + }, + action: function(args) { + $.ajax({ + url: createURL("deleteVpnCustomerGateway"), + data: { + id: args.context.vpnCustomerGateway[0].id + }, + success: function(json) { + var jid = json.deletecustomergatewayresponse.jobid; + args.response.success( + {_custom: + { + jobId: jid + } + } + ); + } + }); + }, + notification: { + poll: pollAsyncJobResult + } + } + }, + tabs: { details: { title: 'label.details',