diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 9653d67b8c..0748495e89 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2011-09-01 Miguel de Dios + + * include/functions_graph.php: fixed to show empty graph in new + installations without data. + + Fixes: #3371197 + 2011-09-01 Juan Manuel Ramon * godmode/snmpconsole/snmp_filters.php: Added confirmation message in diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index cd1a08812c..467415bbde 100755 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -910,7 +910,11 @@ function grafico_db_agentes_purge ($id_agent, $width = 380, $height = 300) { $data[__("Older")] += db_get_sql (sprintf ("SELECT COUNT(*) FROM tagente_datos_log4x WHERE 1=1 %s", $query), 0, true); $data[__("Older")] = $data[__("Older")] - $data["3 ".__("Months")]; - + + if ($data[__("Today")] == 0 && $data["1 ".__("Week")] == 0 && + $data["1 ".__("Month")] == 0 && $data["3 ".__("Months")] == 0 && $data[__("Older")] == 0) { + return html_print_image('images/image_problem.png', true); + } return pie3d_graph($config['flash_charts'], $data, $width, $height, __('Other'), '', $config['homedir'] . "/images/logo_vertical_water.png",