diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 3906178d4e..f52a6ccdea 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2011-09-06 Miguel de Dios + + * include/functions_graph.php: hidden the legend of datas with 0 value. + + Fixes: #3379756 + 2011-09-06 Miguel de Dios * operation/events/events_rss.php, operation/events/export_csv.php: fixed diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 467415bbde..7546b95cbe 100755 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -1322,18 +1322,33 @@ function grafico_eventos_total($filter = "") { $sql = "SELECT COUNT(id_evento) FROM tevento WHERE criticity = 0 $filter"; $data[__('Maintenance')] = db_get_sql ($sql); + if ($data[__('Maintenance')] == 0) { + unset($data[__('Maintenance')]); + } $sql = "SELECT COUNT(id_evento) FROM tevento WHERE criticity = 1 $filter"; $data[__('Informational')] = db_get_sql ($sql); + if ($data[__('Informational')] == 0) { + unset($data[__('Informational')]); + } $sql = "SELECT COUNT(id_evento) FROM tevento WHERE criticity = 2 $filter"; $data[__('Normal')] = db_get_sql ($sql); + if ($data[__('Normal')] == 0) { + unset($data[__('Normal')]); + } $sql = "SELECT COUNT(id_evento) FROM tevento WHERE criticity = 3 $filter"; $data[__('Warning')] = db_get_sql ($sql); + if ($data[__('Warning')] == 0) { + unset($data[__('Warning')]); + } $sql = "SELECT COUNT(id_evento) FROM tevento WHERE criticity = 4 $filter"; $data[__('Critical')] = db_get_sql ($sql); + if ($data[__('Critical')] == 0) { + unset($data[__('Critical')]); + } asort ($data);