Changeset 797 for branches/0.4/web/addons/job_monarch/graph.php
 Timestamp:
 04/06/13 17:25:58 (9 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branches/0.4/web/addons/job_monarch/graph.php
r796 r797 100 100 $space1 = ' '; 101 101 $space2 = ''; 102 $extras = ' font LEGEND:7 '; 102 103 } else if ($size == 'overviewmedium') { 103 104 $eol1 = ''; 104 105 $space1 = ''; 105 106 $space2 = ''; 106 $extras = ' font LEGEND:7 ';107 $extras = ' font LEGEND:7 '; 107 108 } else if ($size == 'large') { 108 109 $eol1 = ''; … … 462 463 $def_nr = 0; 463 464 465 464 466 foreach( $rrd_dirs as $rrd_dir ) 465 467 { … … 478 480 ."AREA:'sum${def_nr}'#".$conf['default_metric_color']."${title_str} "; 479 481 482 if( $conf['graphreport_stats'] ) 483 { 484 $series .= "CDEF:sum${def_nr}_nonans=sum${def_nr},UN,0,sum${def_nr},IF "; 485 } 486 480 487 $def_nr++; 481 488 } 482 489 490 if( $conf['graphreport_stats'] ) 491 { 492 $s_last = $def_nr  1; 493 $series_sum = "CDEF:sum=sum0_nonans"; 494 495 if( $def_nr > 1 ) 496 { 497 foreach (range(1, ($s_last)) as $print_nr ) 498 { 499 $series_sum .= ",sum{$print_nr}_nonans,+"; 500 } 501 } 502 503 $series_sum .= " "; 504 505 $series_last = "VDEF:'sum_last'=sum,LAST "; 506 $series_minimum = "VDEF:'sum_min'=sum,MINIMUM "; 507 $series_average = "VDEF:'sum_avg'=sum,AVERAGE "; 508 $series_maximum = "VDEF:'sum_max'=sum,MAXIMUM "; 509 510 $series .= $series_sum . $series_last . $series_minimum . $series_average . $series_maximum; 511 512 $series .= "COMMENT:\"\\n\" "; 513 $series .= "GPRINT:'sum_last':'${space1}Now\:%6.1lf%s' " 514 . "GPRINT:'sum_min':'${space1}Min\:%6.1lf%s${eol1}' " 515 . "GPRINT:'sum_avg':'${space2}Avg\:%6.1lf%s' " 516 . "GPRINT:'sum_max':'${space1}Max\:%6.1lf%s\\l' "; 517 } 483 518 } 484 519 }
Note: See TracChangeset
for help on using the changeset viewer.