Ignore:
Timestamp:
03/27/13 18:47:17 (9 years ago)
Author:
ramonb
Message:

graph.php,
overview.php:

  • display range in title
  • removed RRDs column count: now done via css

templates/overview.tpl:

  • removed RRDs column count: now done via css

index.php:

  • dont show range selector if no show hosts
File:
1 edited

Legend:

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

    r754 r758  
    120120    global $JOB_ARCHIVE, $period_start, $period_stop, $h, $id;
    121121    global $job_start, $job_stop, $range, $r, $metricname;
    122     global $conf;
     122    global $conf, $show_hosts;
    123123    try
    124124       {
     
    182182
    183183    $tpl = new Dwoo_Template_File("templates/header.tpl");
    184     echo $tpl;
    185184    $tpl_data = new Dwoo_Data();
    186 
    187     if( $view != "search" )
    188     {
    189         $tpl_data->assign( "refresh", $default_refresh );
    190     }
    191185
    192186    $tpl_data->assign( "date", date("r") );
     
    375369    }
    376370
    377     if( $view != "search" )
    378     {
    379         $context_ranges[]="hour";
    380         $context_ranges[]="day";
    381         $context_ranges[]="week";
    382         $context_ranges[]="month";
    383         $context_ranges[]="year";
    384         $context_ranges[]="job";
    385 
    386         $range_menu = "<B>Last</B>&nbsp;&nbsp;" ."<SELECT NAME=\"r\" OnChange=\"toga_form.submit();\">\n";
    387         foreach ($context_ranges as $v)
    388         {
    389             $url=rawurlencode($v);
    390             $range_menu .= "<OPTION VALUE=\"$url\" ";
    391             if ($v == $range)
    392                 $range_menu .= "SELECTED";
    393             $range_menu .= ">$v\n";
     371    if( array_key_exists( "id", $filter ) or isset($hostname) )
     372    {
     373
     374        #$range = "job";
     375
     376        if( ( $page_call != "host_view" ) && ( $view != "search" ) )
     377        {
     378            $context_ranges[]="hour";
     379            $context_ranges[]="day";
     380            $context_ranges[]="week";
     381            $context_ranges[]="month";
     382            $context_ranges[]="year";
     383            $context_ranges[]="job";
     384
     385            $range_menu = "<B>Last</B>&nbsp;&nbsp;" ."<SELECT NAME=\"r\" OnChange=\"toga_form.submit();\">\n";
     386            foreach ($context_ranges as $v)
     387            {
     388                $url=rawurlencode($v);
     389                $range_menu .= "<OPTION VALUE=\"$url\" ";
     390                if ($v == $range)
     391                {
     392                    $range_menu .= "SELECTED";
     393                }
     394                $range_menu .= ">$v\n";
     395            }
     396            $range_menu .= "</SELECT>\n";
     397
     398            $tpl_data->assign("range_menu", $range_menu);
    394399        }
    395         $range_menu .= "</SELECT>\n";
    396 
    397         $tpl_data->assign("range_menu", $range_menu);
    398400
    399401    }
Note: See TracChangeset for help on using the changeset viewer.