Ignore:
Timestamp:
03/24/13 19:45:18 (11 years ago)
Author:
ramonb
Message:

libtoga.php,
index.php:

  • fix some weird issue range being overwritten by Ganglia

overview.php:

  • give rjqj graph range job: as far back as earliest job started
File:
1 edited

Legend:

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

    r735 r738  
    3434}
    3535
     36$rjqj_start = null;
    3637$ds         = new DataSource();
    3738$myxml_data = $ds->getData();
     
    604605    }
    605606
    606     // Running / queued amount jobs graph
    607     //
    608     if( $rjqj_host != null )
    609     {
    610 
    611         $rjqj_str  = "<A HREF=\"./graph.php?z=large&c=$clustername&g=job_report&r=$range&st=$cluster[LOCALTIME]\">";
    612         $rjqj_str .= "<IMG BORDER=0 SRC=\"./graph.php?z=small&c=$clustername&g=job_report&r=$range&st=$cluster[LOCALTIME]\">";
    613         $rjqj_str .= "</A>";
    614 
    615         $tpl->gotoBlock( "_ROOT" );
    616 
    617         $tpl->assign( "rjqj_graph", $rjqj_str );
    618     }
    619607
    620608    foreach( $sorted_jobs as $jobid => $sortdec )
     
    812800                $job_start = $start_time;
    813801
     802
    814803                $view_cpus += $cpus;
    815804
     
    818807                if( $jobs[$jobid]['status'] == 'R' )
    819808                {
     809                    if( $rjqj_start == null )
     810                    {
     811                        $rjqj_start = $start_time;
     812                    }
     813                    else if( $start_time < $rjqj_start )
     814                    {
     815                        $rjqj_start = $start_time;
     816                    }
     817
    820818                    foreach( $jobs[$jobid]['nodes'] as $tempnode )
    821819                    {
     
    873871            }
    874872        }
     873    }
     874    // Running / queued amount jobs graph
     875    //
     876    if( $rjqj_host != null )
     877    {
     878        $rjqj_graphargs = "?z=medium&c=$clustername&g=job_report&r=$range";
     879        if( $range == 'job' )
     880        {
     881            $rjqj_end = time();
     882            $rjqj_graphargs .= "&period_start=$rjqj_start&period_stop=$rjqj_end";
     883        }
     884        else
     885        {
     886            $rjqj_graphargs .= "&st=$cluster[LOCALTIME]";
     887        }
     888
     889        $rjqj_str  = "<A HREF=\"./graph.php$rjqj_graphargs\">";
     890        $rjqj_str .= "<IMG BORDER=0 SRC=\"./graph.php$rjqj_graphargs\">";
     891        $rjqj_str .= "</A>";
     892
     893        $tpl->gotoBlock( "_ROOT" );
     894
     895        $tpl->assign( "rjqj_graph", $rjqj_str );
    875896    }
    876897
Note: See TracChangeset for help on using the changeset viewer.