Changeset 800 for branches/0.4/web/addons
- Timestamp:
- 04/06/13 23:07:09 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.4/web/addons/job_monarch/graph.php
r799 r800 98 98 } else if ($size == 'medium') { 99 99 $eol1 = ''; 100 $space1 = ' 100 $space1 = ''; 101 101 $space2 = ''; 102 102 $extras = ' --font LEGEND:7 '; … … 215 215 foreach( $report_names as $r ) 216 216 { 217 $legend_str = ucfirst( $r ); 218 217 219 if( $r_count == 0 ) 218 220 { 219 221 $graph_str = "AREA"; 220 $legend_str = ucfirst( $r );221 222 } 222 223 else … … 226 227 foreach (range(0, ($s_last)) as $print_nr ) 227 228 { 229 228 230 $series .= "${graph_str}:'cpu_${r}${print_nr}'#".$conf['cpu_'.${r}.'_color'].":'${legend_str}\g' "; 231 $legend_str = ''; 229 232 } 230 233 … … 246 249 . "GPRINT:'${r}_avg':'${space2}Avg\:%6.1lf%s' " 247 250 . "GPRINT:'${r}_max':'${space1}Max\:%6.1lf%s\\l' "; 251 252 $r_count = $r_count + 1; 248 253 } 249 254 } … … 324 329 foreach( $rrd_dirs as $rrd_dir ) 325 330 { 326 if( $def_nr == 0 )327 {328 329 $memuse_str = ":'Memory Used'";330 $memshared_str = ":'Memory Shared'";331 $memcached_str = ":'Memory Cached'";332 $membuff_str = ":'Memory Buffered'";333 $memswap_str = ":'Memory Swapped'";334 $total_str = ":'Total In-Core Memory'";335 }336 else337 {338 339 $memuse_str = "";340 $memshared_str = "";341 $memcached_str = "";342 $membuff_str = "";343 $memswap_str = "";344 $total_str = "";345 }346 347 331 $series .= "DEF:'mem_total${def_nr}'='${rrd_dir}/mem_total.rrd':'sum':AVERAGE " 348 332 ."CDEF:'bmem_total${def_nr}'=mem_total${def_nr},1024,* " … … 396 380 397 381 $conf['mem_buffer_color'] = $conf['mem_buffered_color']; 398 $conf['mem_swap_color'] = $conf['mem_swapped_color'];399 $conf['mem_total_color'] 382 $conf['mem_swap_color'] = $conf['mem_swapped_color']; 383 $conf['mem_total_color'] = $conf['cpu_num_color']; 400 384 401 385 foreach( $report_names as $r ) 402 386 { 403 $legend_str = '';387 $legend_str = ucfirst( $r ); 404 388 405 389 if( $r == "total" ) … … 417 401 foreach (range(0, ($s_last)) as $print_nr ) 418 402 { 419 if( $print_nr == 0 )420 {421 $legend_str = ucfirst( $r );422 }423 403 $series .= "${graph_str}:'bmem_${r}${print_nr}'#".$conf['mem_'.${r}.'_color'].":'${legend_str}\g' "; 404 $legend_str = ''; 424 405 } 425 406
Note: See TracChangeset
for help on using the changeset viewer.