Ignore:
Timestamp:
05/30/05 10:54:38 (19 years ago)
Author:
bastiaans
Message:

toga/conf.php, toga/libtoga.php:

  • Will now use a 'J' marking for all nodes with a running job Not depending on number of cpus in use anymore

toga/overview.php:

  • Fixed makeTime()
File:
1 edited

Legend:

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

    r114 r115  
    3333
    3434        $days = intval( $time / 86400 );
     35        $time = $days ? $time % ($days * 86400) : $time;
     36
    3537        if( $days > 0 ) {
    36                 $time = $time % ($days * 86400);
    3738                if( $days > 1 )
    3839                        $date_str .= $days . 'days - ';
     
    4041                        $date_str .= $days . 'day - ';
    4142        }
     43
    4244        $hours = intval( $time / 3600 );
     45        $time = $hours ? $time % ($hours * 3600) : $time;
     46
    4347        if( $hours > 0 ) {
    44                 $time = $time % ($hours * 3600);
    4548                $date_str .= $hours . ':';
    4649                $date_unit = ' hours';
    4750        }
     51               
    4852        $minutes = intval( $time / 60 );
     53        $seconds = $minutes ? $time % ($minutes * 60) : $time;
     54
    4955        if( $minutes > 0 ) {
    50                 $seconds = $time % ($minutes * 60);
    51                 $date_str .= $minutes . ':';
     56
     57                if( $minutes >= 10 )
     58                        $date_str .= $minutes . ':';
     59                else
     60                        $date_str .= '0' . $minutes . ':';
     61
    5262                $date_unit = (!isset($date_unit)) ? 'minutes' : $date_unit;
    53         }
     63        } else if( $days > 0 or $hours > 0 ) {
     64                $date_str .= '00:';
     65                $date_unit = (!isset($date_unit)) ? 'minutes' : $date_unit;
     66        }
     67
    5468        $date_unit = (!isset($date_unit)) ? 'seconds' : $date_unit;
    55         $date_str .= $seconds . ' ' . $date_unit;
     69
     70        if( $seconds > 0 ) {
     71
     72                if( $seconds >= 10 )
     73                        $date_str .= $seconds . ' ' . $date_unit;
     74                else
     75                        $date_str .= '0' . $seconds . ' ' . $date_unit;
     76                       
     77        } else if ( $days > 0 or $hours > 0 or $minutes > 0 )
     78                $date_str .= '00 ' . $date_unit;
    5679
    5780        return $date_str;
Note: See TracChangeset for help on using the changeset viewer.