diff --git a/src/sunstone/models/sunstone_remotes.rb b/src/sunstone/models/sunstone_remotes.rb index 7f522730b5..abde0962d3 100644 --- a/src/sunstone/models/sunstone_remotes.rb +++ b/src/sunstone/models/sunstone_remotes.rb @@ -115,7 +115,6 @@ class SunstoneRemoteConnections def error(code, msg) @logger.error(msg) - return [code, msg] unless @options[:json_error] [code, OpenNebula::Error.new(msg).to_json] end diff --git a/src/sunstone/public/app/tabs/vms-tab/actions.js b/src/sunstone/public/app/tabs/vms-tab/actions.js index 648e53a4e0..2b404afd9a 100644 --- a/src/sunstone/public/app/tabs/vms-tab/actions.js +++ b/src/sunstone/public/app/tabs/vms-tab/actions.js @@ -260,7 +260,11 @@ define(function(require) { $.each(Sunstone.getDataTable(TAB_ID).elements(), function(index, elem) { Sunstone.runAction("VM.startvnc_action", elem); }); - } + }, + error: function(req, resp) { + Notifier.onError(req, resp); + }, + notify: true }, "VM.startvnc_action" : { type: "single", @@ -290,7 +294,11 @@ define(function(require) { var vm_name = OpenNebulaVM.getName(elem); Sunstone.runAction("VM.startvmrc_action", elem, vm_name); }); - } + }, + error: function(req, resp) { + Notifier.onError(req, resp); + }, + notify: true }, "VM.startvmrc_action" : { type: "single", @@ -318,7 +326,11 @@ define(function(require) { $.each(Sunstone.getDataTable(TAB_ID).elements(), function(index, elem) { Sunstone.runAction("VM.startspice_action", elem); }); - } + }, + error: function(req, resp) { + Notifier.onError(req, resp); + }, + notify: true }, "VM.startspice_action" : { type: "single",