diff --git a/src/sunstone/public/js/plugins/dashboard-tab.js b/src/sunstone/public/js/plugins/dashboard-tab.js index 80fa51d9dc..3af449068c 100644 --- a/src/sunstone/public/js/plugins/dashboard-tab.js +++ b/src/sunstone/public/js/plugins/dashboard-tab.js @@ -209,6 +209,22 @@ var dashboard_tab_content = '\

'+tr("ERROR")+'

\ \ \ +
\ +
\ +
\ +
\ +
\ +
\ +
\ +
\ +
\ +
\ +
\ +
\ +
\ +
\ +
\ +
\ \ \
\ diff --git a/src/sunstone/public/js/plugins/hosts-tab.js b/src/sunstone/public/js/plugins/hosts-tab.js index bb12011b80..2c236814d6 100644 --- a/src/sunstone/public/js/plugins/hosts-tab.js +++ b/src/sunstone/public/js/plugins/hosts-tab.js @@ -35,6 +35,9 @@ var host_graphs = [ } ] +var host_monitoring_args = { + monitor_resources : "HOST_SHARE/CPU_USAGE,HOST_SHARE/USED_CPU,HOST_SHARE/MAX_CPU,HOST_SHARE/MEM_USAGE,HOST_SHARE/USED_MEM,HOST_SHARE/MAX_MEM" +}; var hosts_tab_content = '\
\ @@ -315,16 +318,31 @@ var host_actions = { type: "monitor_global", call : OpenNebula.Host.pool_monitor, callback: function(req,response) { - var info = req.request.data[0].monitor; + var host_dashboard_graphs = [ + { + monitor_resources : "HOST_SHARE/CPU_USAGE,HOST_SHARE/USED_CPU,HOST_SHARE/MAX_CPU", + labels : "Allocated CPU,Real CPU,Total CPU", + humanize_figures : false, + div_graph : $("#dash_host_cpu_graph", $dashboard), + div_legend : $("#dash_host_cpu_legend", $dashboard) + }, + { + monitor_resources : "HOST_SHARE/MEM_USAGE,HOST_SHARE/USED_MEM,HOST_SHARE/MAX_MEM", + labels : "Allocated MEM,Real MEM,Total MEM", + humanize_figures : true, + div_graph : $("#dash_host_mem_graph", $dashboard), + div_legend : $("#dash_host_mem_legend", $dashboard) + } + ]; - // TODO: Set correct divs, here or in host_graphs attribute + for(var i=0; i