Cleanup graphs code

git-svn-id: http://www.observium.org/svn/observer/trunk@1898 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2011-03-17 10:57:51 +00:00
parent 834989df95
commit 6708b67694
17 changed files with 269 additions and 223 deletions
+21 -8
View File
@@ -11,37 +11,50 @@ $line_text = str_pad(truncate($line_text,12,''),12);
$rrd_options .= " DEF:".$rra."=".$rrd_filename.":".$rra.":AVERAGE";
$rrd_options .= " DEF:".$rra."_max=".$rrd_filename.":".$rra.":MAX";
if($print_total) {
if ($print_total)
{
$rrd_options .= " VDEF:".$rra."_total=rra,TOTAL";
}
if($percentile) {
if ($percentile)
{
$rrd_options .= " VDEF:".$rra."_percentile=".$rra.",".$percentile.",PERCENT";
}
if($graph_max) {
if ($graph_max)
{
$rrd_options .= " AREA:".$rra."_max#".$colour_area_max.":";
}
$rrd_options .= " AREA:".$rra."#".$colour_area.":";
$rrd_options .= " COMMENT:'".$unit_text."Now Ave Max";
if($percentile) {
if ($percentile)
{
$rrd_options .= " ".$percentile."th %";
}
$rrd_options .= "\\n'";
$rrd_options .= " LINE1.25:".$rra."#".$colour_line.":'".$line_text."'";
$rrd_options .= " GPRINT:".$rra.":LAST:%6.2lf%s";
$rrd_options .= " GPRINT:".$rra.":AVERAGE:%6.2lf%s";
$rrd_options .= " GPRINT:".$rra."_max:MAX:%6.2lf%s";
if($percentile) {
if ($percentile)
{
$rrd_options .= " GPRINT:".$rra."_percentile:%6.2lf%s";
}
$rrd_options .= "\\\\n";
$rrd_options .= " COMMENT:\\\\n";
if($print_total) {
if ($print_total)
{
$rrd_options .= " GPRINT:".$rra."_tot:Total\ %6.2lf%s\)\\\\l";
}
if($percentile) {
if ($percentile)
{
$rrd_options .= " LINE1:".$rra."_percentile#aa0000";
}
?>
?>