Ignore:
Timestamp:
03/21/13 21:25:19 (11 years ago)
Author:
ramonb
Message:
  • more cleanup
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/0.4/web/addons/job_monarch/graph.php

    r708 r714  
    3232}
    3333
    34 //printf( "st%s\n", $st);
    3534$sourcetime = $st;
    36 //printf( "st%s\n", $sourcetime);
    37 
    38 //printf( "%s\n", $rrds );
    39 //printf( "r%s\n", $range);
    40 //printf( "s %s\n", $start);
    41 //printf( "e %s\n", $end);
    4235
    4336# Graph specific variables
     
    5144$load_color = escapeshellcmd( rawurldecode( $HTTP_GET_VARS["l"] ));
    5245$vlabel = escapeshellcmd( rawurldecode( $HTTP_GET_VARS["vl"] ));
    53 //$sourcetime = escapeshellcmd($HTTP_GET_VARS["st"]);
    5446
    5547$cluster = $c;
     
    7365}
    7466
    75 //printf( "cluster = %s hostname = %s metric = %s\n", $cluster, $hostname, $metricname );
    76 
    7767$trd = new TarchRrdGraph( $cluster, $hostname );
    78 //$rrd_files = $trd->getRrdFiles( $metricname, $start, $stop );
    79 
    80 //print_r( $rrd_files );
    8168
    8269$graph = $metricname;
     
    9279
    9380                $style = "CPU";
    94                 //printf("ik doe die shit!\n");
    9581
    9682                $upper_limit = "--upper-limit 100 --rigid";
     
    140126                $style = "Jobs";
    141127
    142                 //$upper_limit = "--upper-limit 100 --rigid";
    143128                $lower_limit = "--lower-limit 0 --rigid";
    144129                $vertical_label = "--vertical-label Jobs";
     
    164149                $sorted_hosts   = array();
    165150                $sorted_hosts[] = $rjqj_host;
    166 
    167                 //printf( "rjqjh %s\n", $rjqj_host);
    168 
    169                 //printf( "rrdd %s\n", $rrd_dir );
    170151
    171152                $rj_str = ":'Running Jobs'";
     
    339320                }
    340321
    341                 //if ($range=="job") {
    342                 //      $hrs = intval( -$jobrange / 3600 );
    343                 //      $subtitle = "$prefix last ${hrs}h (now $value)";
    344                 //} else
    345                 //      $subtitle = "$prefix last $range (now $value)";
    346 
    347322                if (is_numeric($max))
    348323                        $upper_limit = "--upper-limit '$max' ";
     
    387362}
    388363
    389 //$title = "$hostname $style $metricname";
    390364$title = "$hostname";
    391 
    392 //# Set the graph title.
    393 //if($context == "meta") {
    394 //      $title = "$self $meta_designator $style last $range";
    395 //} else if ($context == "grid") {
    396 //      $title = "$grid $meta_designator $style last $range";
    397 //} else if ($context == "cluster") {
    398 //      $title = "$clustername $style last $range";
    399 //} else {
    400 //      if ($size == "small") {
    401 //              # Value for this graph define a background color.
    402 //              if (!$load_color) $load_color = "ffffff";
    403 //                      $background = "--color BACK#'$load_color'";
    404 
    405 //              $title = $hostname;
    406 //      } else {
    407 //              if ($style)
    408 //                      $title = "$hostname $style last $range";
    409 //              else
    410 //                      $title = $metricname;
    411 //      }
    412 //}
    413365
    414366function determineXGrid( $p_start, $p_stop ) {
     
    496448if( isset($sourcetime) )
    497449{
    498         //printf("yay");
    499 
    500450        $end = $sourcetime;
    501451        # Get_context makes start negative.
Note: See TracChangeset for help on using the changeset viewer.