From 9255306789a46ea1e0e142a616ccbb08ef1c44d0 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Wed, 16 Dec 2009 13:29:19 +0000 Subject: [PATCH] 2009-12-16 Miguel de Dios * include/fgraph.php: fix print image error as tag instead content file when there is error in data string. And add new type of graph, error graph. Fixes: 2908174 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2204 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 +++++++ pandora_console/include/fgraph.php | 7 +++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 2f75d5b272..2fd9b3ce15 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2009-12-16 Miguel de Dios + + * include/fgraph.php: fix print image error as tag instead content + file when there is error in data string. And add new type of graph, error + graph. + Fixes: 2908174 + 2009-12-16 Miguel de Dios * ChangeLog: fix the days in the last dates. diff --git a/pandora_console/include/fgraph.php b/pandora_console/include/fgraph.php index ade8d8f9d6..a55171179a 100644 --- a/pandora_console/include/fgraph.php +++ b/pandora_console/include/fgraph.php @@ -1478,10 +1478,12 @@ function grafico_modulo_string ($id_agente_modulo, $period, $show_event, } if ($valor_maximo <= 0) { - graphic_error (); + $image = "../../include/fgraph.php?tipo=graphic_error"; + print_image ($image, false, array ("border" => 0)); + return; } - + if ($period <= 3600) { $title_period = __('Last hour'); $time_format = 'G:i:s'; @@ -1673,6 +1675,7 @@ if ($graphic_type) { grafico_modulo_string ($id, $period, $draw_events, $width, $height, $label, $unit_name, $draw_alerts, $avg_only, $pure, $date); break; + case 'graphic_error': default: graphic_error (); }