mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
Feature #4212: Show VM ID after import action
This commit is contained in:
parent
2650e14dca
commit
a4c3268410
@ -217,6 +217,7 @@ module OpenNebula
|
||||
return rc if OpenNebula.is_error?(rc)
|
||||
|
||||
vm.deploy(id, false)
|
||||
return vm.id
|
||||
end
|
||||
|
||||
#######################################################################
|
||||
|
@ -73,7 +73,12 @@ module OpenNebulaJSON
|
||||
end
|
||||
|
||||
def import_wild(params=Hash.new)
|
||||
super(params['name'])
|
||||
rc = super(params['name'])
|
||||
if OpenNebula.is_error?(rc)
|
||||
return rc
|
||||
else
|
||||
return VirtualMachineJSON.new_with_id(rc, @client)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -206,7 +206,11 @@ class SunstoneServer < CloudServer
|
||||
if OpenNebula.is_error?(rc)
|
||||
return [500, rc.to_json]
|
||||
else
|
||||
return [204, resource.to_json]
|
||||
if rc.nil?
|
||||
return [204, resource.to_json]
|
||||
else
|
||||
return [201, rc.to_json]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -53,10 +53,10 @@ define(function(require) {
|
||||
type: "POST",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify(action),
|
||||
success: function() {
|
||||
success: function(response) {
|
||||
_clearCache(cache_name);
|
||||
|
||||
return callback ? callback(request) : null;
|
||||
return callback ? callback(request, response) : null;
|
||||
},
|
||||
error: function(response) {
|
||||
return callbackError ?
|
||||
|
@ -151,7 +151,7 @@ define(function(require) {
|
||||
data: dataJSON,
|
||||
success: function(request, response) {
|
||||
OpenNebulaAction.clear_cache("VM");
|
||||
// TODO Notifier.notifyCustom(Locale.tr("VM imported"), " ID: " + response.VM.ID, false);
|
||||
Notifier.notifyCustom(Locale.tr("VM imported"), " ID: " + response.VM.ID, false);
|
||||
|
||||
// Delete row (shouldn't be there in next monitorization)
|
||||
that.dataTableWildHosts.fnDeleteRow(wild_row);
|
||||
|
Loading…
x
Reference in New Issue
Block a user