diff --git a/src/sunstone/models/OpenNebulaJSON/VirtualMachineJSON.rb b/src/sunstone/models/OpenNebulaJSON/VirtualMachineJSON.rb index c1bb20009e..f8240be10d 100644 --- a/src/sunstone/models/OpenNebulaJSON/VirtualMachineJSON.rb +++ b/src/sunstone/models/OpenNebulaJSON/VirtualMachineJSON.rb @@ -60,6 +60,7 @@ module OpenNebulaJSON when "stop" then self.stop when "suspend" then self.suspend when "restart" then self.restart + when "reset" then self.reset when "saveas" then self.save_as(action_hash['params']) when "shutdown" then self.shutdown when "reboot" then self.reboot diff --git a/src/sunstone/public/js/opennebula.js b/src/sunstone/public/js/opennebula.js index a69f0e9809..1b26612c1c 100644 --- a/src/sunstone/public/js/opennebula.js +++ b/src/sunstone/public/js/opennebula.js @@ -615,6 +615,9 @@ var OpenNebula = { "reboot" : function(params){ OpenNebula.Action.simple_action(params,OpenNebula.VM.resource,"reboot"); }, + "reset" : function(params){ + OpenNebula.Action.simple_action(params,OpenNebula.VM.resource,"reset"); + }, "log": function(params){ OpenNebula.Action.show(params,OpenNebula.VM.resource,"log"); diff --git a/src/sunstone/public/js/plugins/vms-tab.js b/src/sunstone/public/js/plugins/vms-tab.js index 3f621dbe2f..784b5be34f 100644 --- a/src/sunstone/public/js/plugins/vms-tab.js +++ b/src/sunstone/public/js/plugins/vms-tab.js @@ -301,6 +301,15 @@ var vm_actions = { notify: true }, + "VM.reset" : { + type: "multiple", + call: OpenNebula.VM.reset, + callback: vmShow, + elements: vmElements, + error: onError, + notify: true + }, + "VM.resubmit" : { type: "multiple", call: OpenNebula.VM.resubmit, @@ -569,6 +578,11 @@ var vm_buttons = { text: tr("Reboot"), tip: tr("This will send a reboot action to running VMs") }, + "VM.reset" : { + type: "confirm", + text: tr("Reset"), + tip: tr("This will perform a hard reboot on selected VMs") + }, "VM.saveasmultiple" : { type: "action", text: tr("Save as")