Ignore:
Timestamp:
08/05/05 12:55:27 (19 years ago)
Author:
bastiaans
Message:

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

  • Removed graph timeperiod selection -> to be placed in header

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

  • Added graph timeperiod selection when browsing jobarchive
  • Now a user can change graphing timeperiods for the node detail graphs from the archive!

web/addons/toga/host_view.php:

  • Added correct parsing of timeperiod

web/addons/toga/index.php:

  • Added placement of graph timeperiod selection and variables

web/addons/toga/search.php:

  • Small cleanup
File:
1 edited

Legend:

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

    r149 r189  
    66//$tpl->prepare();
    77
     8function datetimeToEpoch( $datetime ) {
     9
     10        //printf("datetime = %s\n", $datetime );
     11        $datetime_fields = explode( ' ', $datetime );
     12
     13        $date = $datetime_fields[0];
     14        $time = $datetime_fields[1];
     15
     16        $date_fields = explode( '-', $date );
     17
     18        $days = $date_fields[0];
     19        $months = $date_fields[1];
     20        $years = $date_fields[2];
     21
     22        //printf( "days = %s months = %s years = %s\n", $days, $months, $years );
     23
     24        $time_fields = explode( ':', $time );
     25
     26        $hours = $time_fields[0];
     27        $minutes = $time_fields[1];
     28        $seconds = $time_fields[2];
     29
     30        //printf( "hours = %s minutes = %s seconds = %s\n", $hours, $minutes, $seconds );
     31
     32        $timestamp = mktime( $hours, $minutes, $seconds, $months, $days, $years );
     33
     34        //printf( "timestamp = %s\n", $timestamp );
     35
     36        return $timestamp;
     37}
    838
    939function makeHostView() {
     
    2454        $tpl->assign("sort",$sort);
    2555        $tpl->assign("range",$range);
     56
     57        if( !is_numeric( $period_start ) ) {
     58                $period_start = datetimeToEpoch( $period_start );
     59        }
     60        if( !is_numeric( $period_stop ) ) {
     61                $period_stop = datetimeToEpoch( $period_stop );
     62        }
    2663
    2764        if($hosts_up)
Note: See TracChangeset for help on using the changeset viewer.