From a3dc030e244c528c6542a0318751d160f2bb81c1 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Thu, 1 Sep 2011 15:03:00 +0000 Subject: [PATCH] 2011-09-01 Miguel de Dios * include/functions_graph.php: fixed to show empty graph in new installations without data. Fixes: #3371197 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4880 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 +++++++ pandora_console/include/functions_graph.php | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) 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",