2011-09-06 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_graph.php: hidden the legend of datas with 0 value.
	
	Fixes: #3379756



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4916 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2011-09-06 12:32:26 +00:00
parent c10ffbd7dd
commit f10c21c68f
2 changed files with 21 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2011-09-06 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php: hidden the legend of datas with 0 value.
Fixes: #3379756
2011-09-06 Miguel de Dios <miguel.dedios@artica.es>
* operation/events/events_rss.php, operation/events/export_csv.php: fixed

View File

@ -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);