diff --git a/src/sunstone/public/css/app.css b/src/sunstone/public/css/app.css index aea314a90e..e85a8b855f 100644 --- a/src/sunstone/public/css/app.css +++ b/src/sunstone/public/css/app.css @@ -6738,24 +6738,39 @@ a.footer.button { } /* line 740, ../sass/app.scss */ +.graph_legend { + text-align: center; +} + +/* line 744, ../sass/app.scss */ .graph_legend table { - background: #f2f2f2; + background: inherit; border: 0px; width: 100%; } -/* line 746, ../sass/app.scss */ +/* line 750, ../sass/app.scss */ +.graph_legend h3 { + margin-top: 0px; +} + +/* line 754, ../sass/app.scss */ .graph_legend .subheader { margin-bottom: 5px; } -/* line 750, ../sass/app.scss */ +/* line 758, ../sass/app.scss */ .dashboard hr { margin: 0; margin-bottom: 8px; } -/* line 755, ../sass/app.scss */ +/* line 763, ../sass/app.scss */ .graph { margin-bottom: 15px !important; } + +/* line 767, ../sass/app.scss */ +.dashboard-panel { + height: 517px; +} diff --git a/src/sunstone/public/js/plugins/dashboard-tab.js b/src/sunstone/public/js/plugins/dashboard-tab.js index 0c52364e4e..2a0b489107 100644 --- a/src/sunstone/public/js/plugins/dashboard-tab.js +++ b/src/sunstone/public/js/plugins/dashboard-tab.js @@ -200,7 +200,7 @@ var dashboard_tab_content = '\ \
\
\ -
\ +
\
\
'+tr("Hosts")+'
\
\ @@ -218,7 +218,7 @@ var dashboard_tab_content = '\ \
\
\ -
\ +
\
\

'+tr("CPU")+'

\
\ @@ -243,7 +243,7 @@ var dashboard_tab_content = '\
\
\
\ -
\ +
\
\
'+tr("Virtual Machines")+'
\
\ @@ -269,9 +269,9 @@ var dashboard_tab_content = '\ \
\
\ -
\ +
\
\ -

'+tr("NET DOWNLOAD SLEEP")+'

\ +

'+tr("NET DOWNLOAD SPEED")+'

\
\
\
\ @@ -281,7 +281,7 @@ var dashboard_tab_content = '\
\
\
\ -

'+tr("NET UPLOAD SLEEP")+'

\ +

'+tr("NET UPLOAD SPEED")+'

\
\
\
\ diff --git a/src/sunstone/public/js/plugins/hosts-tab.js b/src/sunstone/public/js/plugins/hosts-tab.js index 4ab9a9ee10..61c98783a9 100644 --- a/src/sunstone/public/js/plugins/hosts-tab.js +++ b/src/sunstone/public/js/plugins/hosts-tab.js @@ -294,14 +294,14 @@ var host_actions = { var host_graphs = [ { monitor_resources : "HOST_SHARE/CPU_USAGE,HOST_SHARE/USED_CPU,HOST_SHARE/MAX_CPU", - labels : "Allocated CPU,Real CPU,Total CPU", + labels : "Allocated,Real,Total", humanize_figures : false, div_graph : $("#host_cpu_graph"), div_legend : $("#host_cpu_legend") }, { monitor_resources : "HOST_SHARE/MEM_USAGE,HOST_SHARE/USED_MEM,HOST_SHARE/MAX_MEM", - labels : "Allocated MEM,Real MEM,Total MEM", + labels : "Allocated,Real,Total", humanize_figures : true, div_graph : $("#host_mem_graph"), div_legend : $("#host_mem_legend") @@ -890,24 +890,30 @@ function updateHostInfo(request,host){ content: '
\
\ -
\ -
\ -
\ +
\ +

'+tr("CPU")+'

\ +
\ +
\ +
\
\ -
\ -
\ -
\ +
\ +
\ +
\
\ +
\
\
\ -
\ -
\ -
\ +
\ +

'+tr("MEMORY")+'

\ +
\ +
\ +
\
\ -
\ -
\ -
\ +
\ +
\ +
\
\ +
\
\
' } diff --git a/src/sunstone/public/js/plugins/vms-tab.js b/src/sunstone/public/js/plugins/vms-tab.js index afb986e661..6724f5c34b 100644 --- a/src/sunstone/public/js/plugins/vms-tab.js +++ b/src/sunstone/public/js/plugins/vms-tab.js @@ -402,29 +402,25 @@ var vm_actions = { monitor_resources : "CPU", labels : "Real CPU", humanize_figures : false, - div_graph : $("#vm_cpu_graph"), - div_legend : $("#vm_cpu_legend") + div_graph : $("#vm_cpu_graph") }, { monitor_resources : "MEMORY", labels : "Real MEM", humanize_figures : true, - div_graph : $("#vm_memory_graph"), - div_legend : $("#vm_memory_legend") + div_graph : $("#vm_memory_graph") }, { labels : "Network reception", monitor_resources : "NET_RX", humanize_figures : true, convert_from_bytes : true, - div_graph : $("#vm_net_rx_graph"), - div_legend : $("#vm_net_rx_legend") + div_graph : $("#vm_net_rx_graph") }, { labels : "Network transmission", monitor_resources : "NET_TX", humanize_figures : true, convert_from_bytes : true, - div_graph : $("#vm_net_tx_graph"), - div_legend : $("#vm_net_tx_legend") + div_graph : $("#vm_net_tx_graph") }, { labels : "Network reception speed", monitor_resources : "NET_RX", @@ -432,8 +428,7 @@ var vm_actions = { convert_from_bytes : true, y_sufix : "B/s", derivative : true, - div_graph : $("#vm_net_rx_speed_graph"), - div_legend : $("#vm_net_rx_speed_legend") + div_graph : $("#vm_net_rx_speed_graph") }, { labels : "Network transmission speed", monitor_resources : "NET_TX", @@ -441,8 +436,7 @@ var vm_actions = { convert_from_bytes : true, y_sufix : "B/s", derivative : true, - div_graph : $("#vm_net_tx_speed_graph"), - div_legend : $("#vm_net_tx_speed_legend") + div_graph : $("#vm_net_tx_speed_graph") } ]; @@ -471,8 +465,7 @@ var vm_actions = { convert_from_bytes : true, y_sufix : "B/s", derivative : true, - div_graph : $("#dash_vm_net_tx_graph", $dashboard), - div_legend : $("#dash_vm_net_tx_legend", $dashboard) + div_graph : $("#dash_vm_net_tx_graph", $dashboard) }, { labels : "Network reception", monitor_resources : "NET_RX", @@ -480,8 +473,7 @@ var vm_actions = { convert_from_bytes : true, y_sufix : "B/s", derivative : true, - div_graph : $("#dash_vm_net_rx_graph", $dashboard), - div_legend : $("#dash_vm_net_rx_legend", $dashboard) + div_graph : $("#dash_vm_net_rx_graph", $dashboard) } ]; @@ -1222,67 +1214,86 @@ function updateVMInfo(request,vm){ var monitoring_tab = { title: tr("Graphs"), - content: - '
\ + content: + '\ +
\
\ -
\ -
\ -
\ +
\ +

'+tr("CPU")+'

\ +
\ +
\ +
\
\ -
\ -
\ -
\ +
\ +
\ +
\
\ +
\
\
\ -
\ -
\ -
\ +
\ +

'+tr("MEMORY")+'

\ +
\ +
\ +
\
\ -
\ -
\ -
\ +
\ +
\ +
\
\ +
\
\
\ -
\ -
\ -
\ +
\ +

'+tr("NET RX")+'

\ +
\ +
\ +
\
\ -
\ -
\ -
\ +
\ +
\ +
\
\ +
\
\
\ -
\ -
\ -
\ +
\ +

'+tr("NET TX")+'

\ +
\ +
\ +
\
\ -
\ -
\ -
\ +
\ +
\ +
\
\ +
\
\
\ -
\ -
\ -
\ +
\ +

'+tr("NET DOWNLOAD SPEED")+'

\ +
\ +
\ +
\
\ -
\ -
\ -
\ +
\ +
\ +
\
\ +
\
\
\ -
\ -
\ -
\ +
\ +

'+tr("NET UPLOAD SPEED")+'

\ +
\ +
\ +
\
\ -
\ -
\ -
\ +
\ +
\ +
\
\ +
\
\
' }; diff --git a/src/sunstone/public/js/sunstone-util.js b/src/sunstone/public/js/sunstone-util.js index ce6716a61a..c14c3c874d 100644 --- a/src/sunstone/public/js/sunstone-util.js +++ b/src/sunstone/public/js/sunstone-util.js @@ -716,6 +716,7 @@ function plot_graph(response, info) { var options = { // colors: [ "#cdebf5", "#2ba6cb", "#6f6f6f" ] + colors: [ "#2ba6cb", "#707D85", "#AC5A62" ], legend : { show : (info.div_legend != undefined), noColumns: attributes.length+1, container: info.div_legend @@ -725,7 +726,7 @@ function plot_graph(response, info) { return pretty_time_axis(val, info.show_date); } }, - yaxis : { labelWidth: 40, + yaxis : { labelWidth: 50, tickFormatter: function(val, axis) { return humanize(val, info.convert_from_bytes, info.y_sufix); }, @@ -826,7 +827,7 @@ function plot_totals(response, info) { var options = { //colors: [ "#2ba6cb", "#cdebf5", "#6f6f6f" ], - colors: [ "#8DDAE4", "#707D85", "#AC5A62" ], + colors: [ "#2ba6cb", "#707D85", "#AC5A62" ], legend : { show : (info.div_legend != undefined), noColumns: attributes.length, backgroundColor: "black", @@ -837,7 +838,7 @@ function plot_totals(response, info) { return pretty_time_axis(val, info.show_date); } }, - yaxis : { labelWidth: 40, + yaxis : { labelWidth: 50, tickFormatter: function(val, axis) { return humanize(val, info.convert_from_bytes, info.y_sufix); }, diff --git a/src/sunstone/public/sass/app.scss b/src/sunstone/public/sass/app.scss index fb5e62d3c4..c660ea381e 100644 --- a/src/sunstone/public/sass/app.scss +++ b/src/sunstone/public/sass/app.scss @@ -737,12 +737,20 @@ a.footer.button { top: 34px !important; } +.graph_legend{ + text-align: center; +} + .graph_legend table { - background: #f2f2f2; + background: inherit; border: 0px; width: 100%; } +.graph_legend h3 { + margin-top: 0px; +} + .graph_legend .subheader { margin-bottom: 5px; } @@ -755,3 +763,7 @@ a.footer.button { .graph { margin-bottom: 15px !important; } + +.dashboard-panel { + height: 517px; +}