Ignore:
Timestamp:
02/17/09 15:57:35 (14 years ago)
Author:
ramonb
Message:

job_monarch/jobstore.php,
job_monarch/graph.php,
job_monarch/js/monarch.js:

  • changed node graph to use own graph.php, since Ganglia's graph.php is broken for jobs
  • correctly set/mark jobstart
  • correctly select time period for job ranges
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web2/addons/job_monarch/jobstore.php

    r603 r604  
    489489                $load_color     = load_color($load);
    490490
     491                $reported       = (int) $jobs[$jid]['reported'];
     492
     493                $time           = time();
    491494
    492495                // RB: something broken here with JR / JS
    493496                //
    494                 //$job_runtime  = intval( $jobs[$jid]['reported'] ) - intval( $jobs[$jid]['start_timestamp'] );
    495                 $job_runtime    = date( 'u' ) - intval( $jobs[$jid]['start_timestamp'] );
    496                 $job_window     = intval( $job_runtime ) * 1.2;
     497                $job_runtime    = $time - intval( $jobs[$jid]['start_timestamp'] );
     498                //$job_runtime  = date( 'u' ) - intval( $jobs[$jid]['start_timestamp'] );
     499                //$job_window   = intval( $job_runtime ) * 1.2;
    497500
    498501                $jobrange       = -$job_window;
    499                 $jobstart       = $jobs[$jid]['start_timestamp'];
     502                $jobstart       = (int) $jobs[$jid]['start_timestamp'];
     503                $period_start   = (int) ($time - (($time - $jobstart) * 1.1 ));
    500504
    501505                $nr['jid']      = $jid;
     
    515519                // maybe later to popup?
    516520                //
    517                 //$host_link      = "\"../../?c=$cluster_url&h=$host_url&r=job&jr=$jobrange&js=$jobstart\"";
     521                //$host_link      = "\"../../?c=$cluster_url&h=$host_url&r=job&jr=$jobrange&job_start=$jobstart\"";
    518522
    519523                if ( $val["TYPE"] == "timestamp" || $always_timestamp[$metricname] )
     
    527531                else
    528532                {
     533                        $end            = time();
    529534                        $graphargs      = ($reports[$metricname]) ? "g=$metricname&" : "m=$metricname&";
    530                         $graphargs      .= "c=$cluster_url&h=$host_url&l=$load_color&v=".$val['VAL']."&r=job&jr=$jobrange&js=$jobstart";
     535                        $graphargs      .= "c=$cluster_url&h=$host_url&l=$load_color&v=".$val['VAL']."&r=job&period_start=$period_start&period_stop=$end&job_start=$jobstart";
    531536
    532537                        if( $max > 0 )
Note: See TracChangeset for help on using the changeset viewer.