diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 1b8eff6395..e6874267ec 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2014-07-18 Miguel de Dios + + * include/functions_graph.php, include/functions_reporting.php: + fixed to show the unknown graph in simple graph. + + INCIDENT: #1035 + 2014-07-17 Miguel de Dios * include/auth/ldap.php, include/auth/mysql.php: fixed the diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index d349349955..771f1e7a1c 100755 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -102,13 +102,14 @@ function get_statwin_graph_statistics ($chart_array, $series_suffix = '') { foreach ($chart_array as $item) { if ($series_suffix != '') { - $item['sum'] = $item['sum'.$series_suffix]; - $item['min'] = $item['min'.$series_suffix]; - $item['max'] = $item['max'.$series_suffix]; + $item['sum'] = $item['sum' . $series_suffix]; + $item['min'] = $item['min' . $series_suffix]; + $item['max'] = $item['max' . $series_suffix]; } //Get stats for normal graph if (isset($item['sum']) && $item['sum']) { + //Sum all values later divide by the number of elements $stats['sum']['avg'] = $stats['sum']['avg'] + $item['sum']; @@ -3257,7 +3258,7 @@ function graph_netflow_host_traffic ($data, $unit, $width = 700, $height = 700) * @param integer date date */ function grafico_modulo_string ($agent_module_id, $period, $show_events, - $width, $height , $title, $unit_name, $show_alerts, $avg_only = 0, $pure=0, + $width, $height , $title, $unit_name, $show_alerts, $avg_only = 0, $pure = 0, $date = 0, $only_image = false, $homeurl = '', $adapt_key = '', $ttl = 1, $menu = true) { global $config; global $graphic_type; @@ -3417,7 +3418,7 @@ function grafico_modulo_string ($agent_module_id, $period, $show_events, //The order in chart array is very important!!!! if ($show_events) { $chart[$timestamp]['event'] = $event_value; - } + } if ($show_alerts) { $chart[$timestamp]['alert'] = $alert_value; diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 42c8e314d3..48ac7b0675 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -3123,9 +3123,29 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f } else { - $data[0] = grafico_modulo_sparse($content['id_agent_module'], $content['period'], - false, $sizgraph_w, $sizgraph_h, '', '', false, true, true, - $report["datetime"], '', 0, 0, true, true, ui_get_full_url(false) . '/'); + $data[0] = grafico_modulo_sparse( + $content['id_agent_module'], + $content['period'], + false, + $sizgraph_w, + $sizgraph_h, + '', + '', + false, + true, + true, + $report["datetime"], + '', + 0, + 0, + true, + true, + ui_get_full_url(false) . '/', + 1, + false, + '', + false, + true); } array_push ($table->data, $data);