2011-08-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php: in function "graphic_agentaccess" fixed when the graph is empty, now show the standar Pandora image "no data to show". Fixes: #3393224 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4786 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
e409791c85
commit
100e9d1d4e
|
@ -1,3 +1,10 @@
|
|||
2011-08-19 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_graph.php: in function "graphic_agentaccess" fixed when
|
||||
the graph is empty, now show the standar Pandora image "no data to show".
|
||||
|
||||
Fixes: #3393224
|
||||
|
||||
2011-08-19 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/styles/menu.css, operation/menu.php, images/plotchart.png: move
|
||||
|
|
|
@ -730,6 +730,7 @@ function graphic_agentaccess ($id_agent, $width, $height, $period = 0) {
|
|||
$time = array ();
|
||||
$data = array ();
|
||||
|
||||
$empty_data = true;
|
||||
for ($i = 0; $i < $interval; $i++) {
|
||||
$bottom = $datelimit + ($periodtime * $i);
|
||||
if (! $graphic_type) {
|
||||
|
@ -755,13 +756,21 @@ function graphic_agentaccess ($id_agent, $width, $height, $period = 0) {
|
|||
'utimestamp > '.$bottom,
|
||||
'utimestamp < '.$top));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($data[$name]['data'] != 0) {
|
||||
$empty_data = false;
|
||||
}
|
||||
}
|
||||
|
||||
echo area_graph($config['flash_charts'], $data, $width, $height,
|
||||
null, null, null, "images/image_problem.opaque.png", "", "", "",
|
||||
$config['homedir'] . "/images/logo_vertical_water.png",
|
||||
$config['fontpath'], $config['font_size'], "");
|
||||
if ($empty_data)
|
||||
echo fs_error_image();
|
||||
else {
|
||||
echo area_graph($config['flash_charts'], $data, $width, $height,
|
||||
null, null, null, "images/image_problem.opaque.png", "", "", "",
|
||||
$config['homedir'] . "/images/logo_vertical_water.png",
|
||||
$config['fontpath'], $config['font_size'], "");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue