cloudstack 3.0 UI: site-to-site VPN: add "Reset VPN connection" action in detailView.

This commit is contained in:
Jessica Wang 2012-07-03 14:25:06 -07:00
parent f5f356c150
commit 5c2b4ed646
1 changed files with 39 additions and 1 deletions

View File

@ -3475,7 +3475,45 @@
}
}
},
actions: {
actions: {
restart: {
label: 'Reset VPN connection',
messages: {
confirm: function(args) {
return 'Please confirm that you want to reset VPN connection' ;
},
notification: function(args) {
return 'Reset VPN connection';
}
},
action: function(args) {
$.ajax({
url: createURL("resetVpnConnection"),
data: {
id: args.context.siteToSiteVpn[0].id
},
dataType: "json",
async: true,
success: function(json) {
var jid = json.resetvpnconnectionresponse.jobid;
args.response.success(
{_custom:
{
jobId: jid,
getUpdatedItem: function(json) {
return json.queryasyncjobresultresponse.jobresult.vpnconnection;
}
}
}
);
}
});
},
notification: {
poll: pollAsyncJobResult
}
},
remove: {
label: 'delete site-to-site VPN',
messages: {