diff --git a/src/sunstone/public/js/plugins/hosts-tab.js b/src/sunstone/public/js/plugins/hosts-tab.js index 785b5714de..7215f160f5 100644 --- a/src/sunstone/public/js/plugins/hosts-tab.js +++ b/src/sunstone/public/js/plugins/hosts-tab.js @@ -181,10 +181,6 @@ var host_actions = { call : OpenNebula.Host.create, callback : function(request, response) { // Reset the create wizard - $create_host_dialog.foundation('reveal', 'close'); - $create_host_dialog.empty(); - setupCreateHostDialog(); - addHostElement(request, response); notifyCustom(tr("Host created"), " ID: " + response.HOST.ID, false); }, @@ -467,12 +463,13 @@ function hostElements(){ return getSelectedNodes(dataTable_hosts); } -function generateCPUProgressBar(host) { - var max_cpu = parseInt(host.HOST_SHARE.MAX_CPU); +function generateCPUProgressBar(host, host_share_flag) { + var host_share = host_share_flag ? host : host.HOST_SHARE; + var max_cpu = parseInt(host_share.MAX_CPU); var info_str; - var allocated_cpu = parseInt(host.HOST_SHARE.CPU_USAGE); + var allocated_cpu = parseInt(host_share.CPU_USAGE); if (max_cpu > 0) { var ratio_allocated_cpu = Math.round((allocated_cpu / max_cpu) * 100); @@ -483,7 +480,7 @@ function generateCPUProgressBar(host) { var pb_allocated_cpu = quotaBarHtml(allocated_cpu, max_cpu, info_str); - var real_cpu = parseInt(host.HOST_SHARE.USED_CPU); + var real_cpu = parseInt(host_share.USED_CPU); if (max_cpu > 0) { var ratio_real_cpu = Math.round((real_cpu / max_cpu) * 100); @@ -500,11 +497,12 @@ function generateCPUProgressBar(host) { } } -function generateMEMProgressBar(host){ +function generateMEMProgressBar(host, host_share_flag) { + var host_share = host_share_flag ? host : host.HOST_SHARE; // Generate MEM progress bars - var max_mem = parseInt(host.HOST_SHARE.MAX_MEM); + var max_mem = parseInt(host_share.MAX_MEM); - var allocated_mem = parseInt(host.HOST_SHARE.MEM_USAGE); + var allocated_mem = parseInt(host_share.MEM_USAGE); if (max_mem > 0) { var ratio_allocated_mem = Math.round((allocated_mem / max_mem) * 100); @@ -515,7 +513,7 @@ function generateMEMProgressBar(host){ var pb_allocated_mem = quotaBarHtml(allocated_mem, max_mem, info_str); - var real_mem = parseInt(host.HOST_SHARE.USED_MEM); + var real_mem = parseInt(host_share.USED_MEM); if (max_mem > 0) { var ratio_real_mem = Math.round((real_mem / max_mem) * 100); @@ -895,13 +893,60 @@ function updateHostInfo(request,host){ ' } + var esx_info_tab = { + title: tr("ESX"), + icon: "fa-hdd-o", + content : '
' + tr("Hostname") + ' | \ +' + tr("Status") + ' | \ +
---|