mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
bug 12910: cloudstack 3.0 new UI - router page - add "Destroy" action.
This commit is contained in:
parent
0fac4a2bb1
commit
45f9701c63
@ -1581,7 +1581,37 @@
|
|||||||
poll: pollAsyncJobResult
|
poll: pollAsyncJobResult
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
'destroy': {
|
||||||
|
label: 'Destroy router',
|
||||||
|
messages: {
|
||||||
|
confirm: function(args) {
|
||||||
|
return 'Are you sure you want to destroy router?';
|
||||||
|
},
|
||||||
|
notification: function(args) {
|
||||||
|
return 'Destroy router';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
action: function(args) {
|
||||||
|
$.ajax({
|
||||||
|
url: createURL("destroyRouter&id=" + args.context.routers[0].id),
|
||||||
|
dataType: "json",
|
||||||
|
async: true,
|
||||||
|
success: function(json) {
|
||||||
|
var jid = json.destroyrouterresponse.jobid;
|
||||||
|
args.response.success({
|
||||||
|
_custom: {
|
||||||
|
jobId: jid
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
notification: {
|
||||||
|
poll: pollAsyncJobResult
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
changeService: {
|
changeService: {
|
||||||
label: 'Change service offering',
|
label: 'Change service offering',
|
||||||
messages: {
|
messages: {
|
||||||
@ -7320,6 +7350,7 @@
|
|||||||
}
|
}
|
||||||
else if (jsonObj.state == 'Stopped') {
|
else if (jsonObj.state == 'Stopped') {
|
||||||
allowedActions.push("start");
|
allowedActions.push("start");
|
||||||
|
allowedActions.push("destroy");
|
||||||
allowedActions.push("changeService");
|
allowedActions.push("changeService");
|
||||||
}
|
}
|
||||||
return allowedActions;
|
return allowedActions;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user