mirror of https://github.com/apache/cloudstack.git
bug 12504: cloudstack 3.0 new UI - system - zone chart - guest - network tabs - network detail - add Restart Network action.
This commit is contained in:
parent
42a460023e
commit
568db1fdb7
|
|
@ -1010,6 +1010,47 @@
|
|||
poll: pollAsyncJobResult
|
||||
}
|
||||
},
|
||||
|
||||
'restart': {
|
||||
label: 'Restart network',
|
||||
action: function(args) {
|
||||
$.ajax({
|
||||
url: createURL("restartNetwork&id=" + args.context.networks[0].id),
|
||||
dataType: "json",
|
||||
async: true,
|
||||
success: function(json) {
|
||||
var jid = json.restartnetworkresponse.jobid;
|
||||
args.response.success(
|
||||
{_custom:
|
||||
{jobId: jid,
|
||||
getUpdatedItem: function(json) {
|
||||
return json.queryasyncjobresultresponse.jobresult.network;
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
},
|
||||
messages: {
|
||||
confirm: function(args) {
|
||||
return 'Please confirm that you want to restart network';
|
||||
},
|
||||
success: function(args) {
|
||||
return 'Network is being restarted';
|
||||
},
|
||||
notification: function(args) {
|
||||
return 'Restarting network';
|
||||
},
|
||||
complete: function(args) {
|
||||
return 'Network has been restarted';
|
||||
}
|
||||
},
|
||||
notification: {
|
||||
poll: pollAsyncJobResult
|
||||
}
|
||||
},
|
||||
|
||||
'delete': {
|
||||
label: 'Delete network',
|
||||
messages: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue