mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
Merge pull request #1701 from shapeblue/vr-destroy-ui-allow
CLOUDSTACK-9534: Allow VR to be destroy in UI when in running stateThis allows us to destroy a VR that is in running state from the UI. This action is possible via cloudmonkey/APIs, and would be useful for anyone who wants to simply destroy a VR from the UI without having to stop it first. As this is a pure UI fix, manual testing would be needed but no regression integration testing is necessary. /cc @jburwell @karuturi @blueorangutan package Screenshot:  * pr/1701: CLOUDSTACK-9534: Allow VR to be destroy in UI when in running state Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
commit
84e282596e
@ -2585,6 +2585,11 @@
|
||||
label: 'label.destroy.router',
|
||||
messages: {
|
||||
confirm: function (args) {
|
||||
if (args && args.context && args.context.routers[0]) {
|
||||
if (args.context.routers[0].state == 'Running') {
|
||||
return dictionary['message.action.stop.router'] + ' ' + dictionary['message.confirm.destroy.router'];
|
||||
}
|
||||
}
|
||||
return 'message.confirm.destroy.router';
|
||||
},
|
||||
notification: function (args) {
|
||||
@ -3752,6 +3757,11 @@
|
||||
label: 'label.destroy.router',
|
||||
messages: {
|
||||
confirm: function (args) {
|
||||
if (args && args.context && args.context.routers[0]) {
|
||||
if (args.context.routers[0].state == 'Running') {
|
||||
return dictionary['message.action.stop.router'] + ' ' + dictionary['message.confirm.destroy.router'];
|
||||
}
|
||||
}
|
||||
return 'message.confirm.destroy.router';
|
||||
},
|
||||
notification: function (args) {
|
||||
@ -6674,6 +6684,11 @@
|
||||
label: 'label.destroy.router',
|
||||
messages: {
|
||||
confirm: function (args) {
|
||||
if (args && args.context && args.context.routers[0]) {
|
||||
if (args.context.routers[0].state == 'Running') {
|
||||
return dictionary['message.action.stop.router'] + ' ' + dictionary['message.confirm.destroy.router'];
|
||||
}
|
||||
}
|
||||
return 'message.confirm.destroy.router';
|
||||
},
|
||||
notification: function (args) {
|
||||
@ -9830,6 +9845,11 @@
|
||||
label: 'label.destroy.router',
|
||||
messages: {
|
||||
confirm: function (args) {
|
||||
if (args && args.context && args.context.routers[0]) {
|
||||
if (args.context.routers[0].state == 'Running') {
|
||||
return dictionary['message.action.stop.router'] + ' ' + dictionary['message.confirm.destroy.router'];
|
||||
}
|
||||
}
|
||||
return 'message.confirm.destroy.router';
|
||||
},
|
||||
notification: function (args) {
|
||||
@ -20986,8 +21006,9 @@
|
||||
}
|
||||
|
||||
allowedActions.push("restart");
|
||||
|
||||
allowedActions.push("remove");
|
||||
allowedActions.push("viewConsole");
|
||||
|
||||
if (isAdmin())
|
||||
allowedActions.push("migrate");
|
||||
} else if (jsonObj.state == 'Stopped') {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user