2012-03-07 Miguel de Dios <miguel.dedios@artica.es>
* include/graphs/functions_gd.php: fixed into the function "gd_progress_bubble" when the $progress is upper to 100% or lower 0% show the image "out of limits". Merge from the branch "pandora_4.0" git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5705 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
dec4cd1e99
commit
6e0f14e2b6
|
@ -1,3 +1,11 @@
|
|||
2012-03-07 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/graphs/functions_gd.php: fixed into the function
|
||||
"gd_progress_bubble" when the $progress is upper to 100% or lower 0% show
|
||||
the image "out of limits".
|
||||
|
||||
Merge from the branch "pandora_4.0"
|
||||
|
||||
2012-03-07 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* godmode/reporting/graph_builder.main.php: Added custom
|
||||
|
|
|
@ -183,6 +183,15 @@ function gd_progress_bubble ($width, $height, $progress, $title, $font, $out_of_
|
|||
global $config;
|
||||
global $REMOTE_ADDR;
|
||||
|
||||
if ($progress > 100 || $progress < 0) {
|
||||
// HACK: This report a static image... will increase render in about 200% :-) useful for
|
||||
// high number of realtime statusbar images creation (in main all agents view, for example
|
||||
$imgPng = imageCreateFromPng($out_of_lim_image);
|
||||
imageAlphaBlending($imgPng, true);
|
||||
imageSaveAlpha($imgPng, true);
|
||||
imagePng($imgPng);
|
||||
}
|
||||
else {
|
||||
$ratingWidth = ($progress/100)*$width;
|
||||
$ratingHeight = ($progress/100)*$height;
|
||||
|
||||
|
@ -231,6 +240,7 @@ function gd_progress_bubble ($width, $height, $progress, $title, $font, $out_of_
|
|||
($width/2) - ($size[4] / 2), ($height/2) + ($size[1] / 2), $black, $font, $value_text);
|
||||
|
||||
imagePNG($image);
|
||||
}
|
||||
imagedestroy($image);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue