Changeset 266


Ignore:
Timestamp:
06/26/06 13:38:27 (16 years ago)
Author:
bastiaans
Message:

jobmond/jobmond.py:

  • try to guess api 'pbs' for old configs

web/addons/job_monarch/index.php:

  • changed makeHeader() to check for page_call. this will prevent multiple Jobarchive link/images in the header, by multiple calls

web/addons/job_monarch/overview.php:

  • added makeHeader() call and filter[id] set. when only 1 job is found, it now automaticly jumps to show_hosts and sets correct filter in header html
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/jobmond/jobmond.py

    r265 r266  
    106106
    107107                BATCH_SERVER = cfg.get( 'DEFAULT', 'TORQUE_SERVER' )
     108                api_guess = 'pbs'
    108109       
    109110        try:
     
    117118
    118119                BATCH_POLL_INTERVAL = cfg.getint( 'DEFAULT', 'TORQUE_POLL_INTERVAL' )
     120                api_guess = 'pbs'
     121               
    119122        GMOND_CONF = cfg.get( 'DEFAULT', 'GMOND_CONF' )
    120123
     
    123126        BATCH_HOST_TRANSLATE = getlist( cfg.get( 'DEFAULT', 'BATCH_HOST_TRANSLATE' ) )
    124127
    125         BATCH_API = cfg.get( 'DEFAULT', 'BATCH_API' )
    126 
     128        try:
     129
     130                BATCH_API = cfg.get( 'DEFAULT', 'BATCH_API' )
     131
     132        except ConfigParser.NoOptionError, detail:
     133
     134                if BATCH_SERVER and api_guess:
     135                        BATCH_API = api_guess
     136                else:
     137                        debug_msg( 0, "fatal error: BATCH_API not set and can't make guess" )
     138                        sys.exit( 1 )
     139       
    127140        return True
    128141
  • trunk/web/addons/job_monarch/index.php

    r263 r266  
    8686}
    8787
    88 function makeHeader() {
     88function makeHeader( $page_call ) {
    8989
    9090        global $tpl, $grid, $context, $initgrid;
     
    317317        }
    318318
    319         if( $JOB_ARCHIVE ) {
     319        if( $JOB_ARCHIVE && $page_call == 'index' ) {
    320320                $tpl->newBlock( "search" );
    321321                $tpl->assignGlobal( "cluster_url", rawurlencode($clustername) );
     
    407407
    408408$title = "Torque Report";
    409 makeHeader();
     409makeHeader( 'index' );
    410410$tpl->assign("cluster_url", rawurlencode($clustername) );
    411411$tpl->assign("cluster", $clustername );
  • trunk/web/addons/job_monarch/overview.php

    r263 r266  
    720720        $tpl->assignGlobal("report_time", makeDate( $heartbeat));
    721721
    722         //if( intval($view_jobs) == 1 and $start_time )
    723         //      if( $last_displayed_job != null )
    724         //              $filter[id] = $last_displayed_job;
    725 
    726         //makeHeader();
     722        if( intval($view_jobs) == 1 and $start_time )
     723                if( $last_displayed_job != null )
     724                        $filter[id] = $last_displayed_job;
     725
     726        makeHeader( 'overview' );
    727727        setupFilterSettings();
    728728
Note: See TracChangeset for help on using the changeset viewer.