Ignore:
Timestamp:
06/20/05 14:50:55 (19 years ago)
Author:
bastiaans
Message:

web/addons/toga/templates/host_view.tpl:

  • First checkin of host_view template

web/addons/toga/host_view.php:

  • Modified host view for toga (archive)
  • Will parse same periods as search

web/addons/toga/templates/search.tpl, web/addons/toga/search.php, web/addons/toga/graph.php:

  • Renamed start and stop to period_start and period_stop

web/addons/toga/index.php:

  • Added inclusion of host_view if specified
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/addons/toga/index.php

    r145 r149  
    3838        global $metrics, $reports, $m, $default_metric;
    3939        global $default_refresh, $filterorder, $view;
    40         global $TARCHD;
     40        global $TARCHD, $period_start, $period_stop, $h, $id;
    4141       
    4242        if( isset($default_metric) and !isset($m) )
     
    189189
    190190        if( $view == "search" ) {
     191
    191192                $node_menu .= "<B>&gt;</B>\n";
    192193                $node_menu .= "<B>Jobarchive</B> ";
    193194                $tpl->assign("view", "search" );
    194195                $form_name = "archive_search_form";
    195                 $tpl->assign("form_name", $form_name );
     196                $tpl->assignGlobal("form_name", $form_name );
     197
    196198        } else {
    197199                $form_name = "toga_form";
    198                 $tpl->assign("form_name", $form_name );
     200                $tpl->assignGlobal("form_name", $form_name );
    199201                $tpl->assign("view", "overview" );
    200202        }
     
    218220                        $metric_menu .= "</SELECT>\n";
    219221
    220                         $tpl->assign("metric_menu", $metric_menu );
    221222                }
     223
     224                $tpl->assign("metric_menu", $metric_menu );
    222225        }
    223226        $m = $metricname;
     
    269272}
    270273
     274function includeHostPage() {
     275
     276        global $tpl;
     277
     278        $tpl->assignInclude( "main", "templates/host_view.tpl" );
     279}
     280
    271281$tpl = new TemplatePower( "templates/index.tpl" );
    272282
    273283$tpl->assignInclude( "header", "templates/header.tpl" );
    274284
     285if( isset( $h ) and $h != '' ) {
     286        $hostname = $h;
     287        $view = "host";
     288}
     289
    275290switch( $view ) {
    276291
     
    283298
    284299                includeSearchPage();
     300                break;
     301
     302        case "host":
     303
     304                includeHostPage();
    285305                break;
    286306
     
    313333                break;
    314334
     335        case "host":
     336
     337                include "./host_view.php";
     338                makeHostView();
     339                break;
     340
    315341        default:
    316342
Note: See TracChangeset for help on using the changeset viewer.