mirror of https://github.com/apache/cloudstack.git
cloudstack 3.0 UI: site-to-site VPN: add "Reset VPN connection" action in detailView.
This commit is contained in:
parent
f5f356c150
commit
5c2b4ed646
|
|
@ -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: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue