Changeset 416 for trunk


Ignore:
Timestamp:
07/06/07 17:54:04 (17 years ago)
Author:
bastiaans
Message:

web/addons/job_monarch/overview.php:

  • fix: don't display running/queued jobs rrd graph if the metrics are not found
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/addons/job_monarch/overview.php

    r409 r416  
    568568        $last_displayed_job     = null;
    569569
    570         $rjqj_str =  "<IMG SRC=\"./graph.php?z=small&c=$clustername&g=job_report&r=$range&st=$cluster[LOCALTIME]\">";
    571 
    572         $tpl->gotoBlock( "_ROOT" );
    573 
    574         $tpl->assign( "rjqj_graph", $rjqj_str );
     570        $rjqj_host              = null;
     571
     572        foreach( $metrics as $bhost => $bmetric )
     573        {
     574                foreach( $bmetric as $mname => $mval )
     575                {
     576                        if( ( $mname == 'MONARCH-RJ' ) || ($mname == 'MONARCH-QJ') )
     577                        {
     578                                $rjqj_host      = $bhost;
     579                        }
     580                }
     581        }
     582
     583        if( $rjqj_host != null )
     584        {
     585
     586                $rjqj_str =  "<IMG SRC=\"./graph.php?z=small&c=$clustername&g=job_report&r=$range&st=$cluster[LOCALTIME]\">";
     587
     588                $tpl->gotoBlock( "_ROOT" );
     589
     590                $tpl->assign( "rjqj_graph", $rjqj_str );
     591        }
    575592
    576593        foreach( $sorted_jobs as $jobid => $sortdec )
Note: See TracChangeset for help on using the changeset viewer.