]> git.sur5r.net Git - bacula/bacula/commitdiff
bacula-web: Removed useless function Get_ElapsedTime_Job() in bweb.inc.php
authorDavide Franco <bacula-dev@dflc.ch>
Mon, 13 Jun 2011 18:41:41 +0000 (20:41 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:49:12 +0000 (14:49 +0200)
gui/bacula-web/includes/bweb.inc.php
gui/bacula-web/index.php

index 60c1182fd491fdbaeba803b573732fd16dd2a9be..34972a88522b8f925c02438d50b64a95061d37d0 100644 (file)
@@ -374,43 +374,6 @@ class Bweb extends DB {
                        return $hrsDiff . ':' . $minsDiff . ':' . $secsDiff;
        }
        
-       public function Get_ElapsedTime_Job( $delay = LAST_DAY )
-       {
-               $query                  = "";
-               $total_elapsed  = 0;
-               
-               // Interval calculation
-               $end_date   = mktime();
-               $start_date = $end_date - $delay;
-               
-               $start_date = date( "Y-m-d H:i:s", $start_date );
-               $end_date   = date( "Y-m-d H:i:s", $end_date );
-               
-               switch( $this->driver )
-               {
-                       case 'mysql':
-                               $query  = "SELECT UNIX_TIMESTAMP(EndTime) - UNIX_TIMESTAMP(StartTime) AS elapsed from Job ";
-                               $query .= "WHERE EndTime BETWEEN '$start_date' AND '$end_date'";
-                       break;
-               }
-               $result = $this->db_link->query( $query );
-               
-               if( PEAR::isError($result) ){
-                       die( "Unable to get elapsed time for jobs from catalog<br />query = $query <br />" . $result->getMessage() );
-               }else {
-                       while( $time = $result->fetchRow( DB_FETCHMODE_ASSOC ) ) {
-                               //echo 'elapsed = ' . $time['elapsed'] . '<br />';
-                               $total_elapsed += $time['elapsed'];
-                       }
-                       // Verify if elapsed time is more than 1 day
-                       if ( $total_elapsed > LAST_DAY ) {
-                               return date("%d days H:i:s", $total_elapsed );
-                       }else {
-                               return date("H:i:s", $total_elapsed );
-                       }
-               }
-       }
-       
        // Return Jobs statistics for a specific interval such as
        // - Completed jobs number
        // - Failed jobs number
index b459a08a4c768ebf195b3999b6a2e7001b0eb452..592fed14ee0a9001bbc56df54b0866391ea261f4 100644 (file)
@@ -72,9 +72,6 @@ $dbSql->tpl->assign( 'failed_jobs', $dbSql->CountJobs( LAST_DAY, 'failed' ) );
 // Last 24 hours waiting jobs number
 $dbSql->tpl->assign( 'waiting_jobs', $dbSql->CountJobs( LAST_DAY, 'waiting' ) );
 
-// Last 24 hours elapsed time (last_run_report.tpl)
-//$smarty->assign( 'elapsed_jobs', $dbSql->Get_ElapsedTime_Job() );
-
 // Last 24 hours Job Levels
 $dbSql->tpl->assign( 'incr_jobs', $dbSql->CountJobsbyLevel( LAST_DAY, 'I') );
 $dbSql->tpl->assign( 'diff_jobs', $dbSql->CountJobsbyLevel( LAST_DAY, 'D') );