diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index c62614ccd3..6387bf5442 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -172,7 +172,6 @@ function pandoraFlotPieCustom( show: true, radius: 5 / 8, formatter: function(label, series) { - console.log(series); return ( '
" + + (d.getHours() < 10 ? "0" : "") + + d.getHours() + ":" + - (v.getMinutes() < 10 ? "0" : "") + - v.getMinutes(); + (d.getMinutes() < 10 ? "0" : "") + + d.getMinutes(); return date_format; } } diff --git a/pandora_console/include/graphs/functions_flot.php b/pandora_console/include/graphs/functions_flot.php index 309ddf364b..eb5596cec4 100644 --- a/pandora_console/include/graphs/functions_flot.php +++ b/pandora_console/include/graphs/functions_flot.php @@ -786,6 +786,8 @@ function flot_slicesbar_graph( // Get a unique identifier to graph $graph_id = uniqid('graph_'); + $height = ((int) $height + 15); + // Set some containers to legend, graph, timestamp tooltip, etc. if ($stat_win) { $return = "
"; @@ -804,8 +806,6 @@ function flot_slicesbar_graph( $separator2 = ':,:,,,:,:'; // Transform data from our format to library format - $labels = []; - $a = []; $vars = []; $datacolor = []; @@ -819,12 +819,12 @@ function flot_slicesbar_graph( $fontsize = $config['font_size']; $fontpath = $config['fontpath']; - $extra_height = 15; + $extra_height = 40; if (defined('METACONSOLE')) { - $extra_height = 20; + $extra_height = 50; } - $return .= "
"; + $return .= ''; $maxticks = (int) 20; @@ -842,11 +842,7 @@ function flot_slicesbar_graph( $intervaltick = (int) $intervaltick; - $acumulate = 0; - $c = 0; - $acumulate_data = []; foreach ($graph_data as $label => $values) { - $labels[] = $label; $i--; foreach ($values as $key => $value) { @@ -857,19 +853,10 @@ function flot_slicesbar_graph( } $data[$jsvar][] = $value; - - $acumulate_data[$c] = $acumulate; - $acumulate += $value; - $c++; - - if ($value > $max) { - $max = $value; - } } } - // Store serialized data to use it from javascript - $labels = implode($separator, $labels); + // Store serialized data to use it from javascript. $datacolor = implode($separator, $datacolor); if (is_array($legend)) { $legend = io_safe_output(implode($separator, $legend)); @@ -881,19 +868,11 @@ function flot_slicesbar_graph( $full_legend_date = false; } - $acumulate_data = io_safe_output(implode($separator, $acumulate_data)); - - // Store data series in javascript format - $jsvars = ''; - $jsseries = []; - $date = get_system_time(); - $datelimit = (($date - $period) * 1000); + $datelimit = (($date - $period)); $i = 0; - $values2 = []; - foreach ($data as $jsvar => $values) { $values2[] = implode($separator, $values); $i ++; @@ -901,10 +880,10 @@ function flot_slicesbar_graph( $values = implode($separator2, $values2); - // Javascript code + // Javascript code. $return .= "'; diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 27b3094027..459cc5c54d 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -5888,3 +5888,18 @@ table.table_modal_alternate tr td:first-child { .fullwidth { width: 100%; } + +.slicebar-box-hover-styles { + position: absolute; + background-color: #fff; + width: 80px; + height: 20px; + text-align: center; + font-family: arial, sans-serif, verdana; + padding: 3px; + border: 1px solid black; +} + +.flot-text { + width: 101%; +}