diff --git a/src/sunstone/public/js/plugins/hosts-tab.js b/src/sunstone/public/js/plugins/hosts-tab.js index 4e6fdda278..d0ad8cf089 100644 --- a/src/sunstone/public/js/plugins/hosts-tab.js +++ b/src/sunstone/public/js/plugins/hosts-tab.js @@ -962,6 +962,26 @@ function updateHostInfo(request,host){ ' } + var wilds_info_tab = { + title: tr("WILDS"), + icon: "fa-hdd-o", + content : '
\ +
\ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ +
' + tr("VM name") + '' + tr("UUID") + '' + tr("Import") + '
\ +
\ +
' + } + //Sunstone.updateInfoPanelTab(info_panel_name,tab_name, new tab object); Sunstone.updateInfoPanelTab("host_info_panel","host_info_tab",info_tab); Sunstone.updateInfoPanelTab("host_info_panel","host_monitoring_tab",monitor_tab); @@ -969,11 +989,13 @@ function updateHostInfo(request,host){ if (host_info.TEMPLATE.HYPERVISOR == "vcenter") { Sunstone.updateInfoPanelTab("host_info_panel","host_esx_tab",esx_info_tab); + Sunstone.updateInfoPanelTab("host_info_panel","host_wilds_tab",wilds_info_tab); } Sunstone.popUpInfoPanel("host_info_panel", "hosts-tab"); if (host_info.TEMPLATE.HYPERVISOR == "vcenter") { + // ESX datatable var dataTable_esx_hosts = $("#datatable_host_esx",main_tabs_context).dataTable({ "bSortClasses" : false, "bDeferRender": true @@ -1003,6 +1025,32 @@ function updateHostInfo(request,host){ dataTable_esx_hosts.fnAddData(host_list_array); delete host_info.TEMPLATE.HOST; } + + // WILDS datatable + var dataTable_wilds_hosts = $("#datatable_host_wilds",main_tabs_context).dataTable({ + "bSortClasses" : false, + "bDeferRender": true + }); + + var wilds_list_array = []; + + if (host_info.TEMPLATE.WILDS) { + wilds = host_info.TEMPLATE.WILDS.split(","); + + $.each(wilds, function(){ + name = this.split("_")[0]; + uuid = this.split("_")[1]; + + wilds_list_array.push([ + name, + uuid, + '' + ]); + }); + } + + dataTable_wilds_hosts.fnAddData(wilds_list_array); + delete host_info.TEMPLATE.WILDS; } var dataTable_host_vMachines = $("#datatable_host_vms", $("#host_info_panel")).dataTable({ diff --git a/src/vmm_mad/remotes/vcenter/vcenter_driver.rb b/src/vmm_mad/remotes/vcenter/vcenter_driver.rb index 33c4a639ea..a177e56ecf 100644 --- a/src/vmm_mad/remotes/vcenter/vcenter_driver.rb +++ b/src/vmm_mad/remotes/vcenter/vcenter_driver.rb @@ -644,6 +644,10 @@ class VCenterHost < ::OpenNebula::Host str_info << "ID=#{number}," str_info << "DEPLOY_ID=\"#{vm.vm.config.uuid}\"," str_info << "VM_NAME=\"#{name}\"," + if number == -1 + vm_template_to_one = Base64.encode64(vm.vm_to_one).gsub("\n","") + str_info << "IMPORT_TEMPLATE=\"#{vm_template_to_one}\"," + end str_info << "POLL=\"#{vm.info}\"]" }