1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-23 22:50:09 +03:00

Feature #3654: Update vm recover action in sunstone

This commit is contained in:
Carlos Martín 2015-04-23 16:53:29 +02:00
parent 6ce059d909
commit 753f640166
3 changed files with 9 additions and 7 deletions

View File

@ -170,8 +170,7 @@ module OpenNebulaJSON
end
def recover(params=Hash.new)
result = params['with'] == "success" ? true : false
super(result)
super(params['result'].to_i)
end
end
end

View File

@ -1164,7 +1164,7 @@ var OpenNebula = {
OpenNebula.Action.simple_action(params,OpenNebula.VM.resource,"unresched");
},
"recover" : function(params){
var action_obj = {"with": params.data.extra_param};
var action_obj = {"result": params.data.extra_param};
OpenNebula.Action.simple_action(params,OpenNebula.VM.resource,"recover",action_obj);
},
"accounting": function(params){

View File

@ -1066,12 +1066,15 @@ var vm_buttons = {
type: "confirm_with_select",
text: tr("Recover"),
layout: "vmsplanification_buttons",
custom_select: '<select class="resource_list_select"><option value="success">' + tr("success") + '</option>\
<option value="failure">' + tr("failure") + '</option></select>',
custom_select: '<select class="resource_list_select">\
<option value="2">' + tr("retry") + '</option>\
<option value="1">' + tr("success") + '</option>\
<option value="0">' + tr("failure") + '</option>\
</select>',
tip: tr("Recovers a stuck VM that is waiting for a driver operation. \
The recovery may be done by failing or succeeding the pending operation. \
The recovery may be done by failing, succeeding or retrying the current operation. \
YOU NEED TO MANUALLY CHECK THE VM STATUS ON THE HOST, to decide if the operation \
was successful or not."),
was successful or not, or if it can be retried."),
custom_classes : "state-dependent"
},
"VM.startvnc" : {