From: Davide Franco Date: Mon, 20 Dec 2010 16:29:23 +0000 (+0100) Subject: bacula-web: Optimized last completed and failed jobs X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e6e6a80dc0f2492364e87c3e5282a45f463bf0f3;p=bacula%2Fbacula bacula-web: Optimized last completed and failed jobs - Replaced by CountLastJobs instead of GetLastJobs and GetLastErrorJobs for last 24 hours completed and failed jobs. --- diff --git a/gui/bacula-web/index.php b/gui/bacula-web/index.php index 217d7acd38..c2616eb231 100644 --- a/gui/bacula-web/index.php +++ b/gui/bacula-web/index.php @@ -96,12 +96,16 @@ $smarty->assign( 'total_name_jobs', $dbSql->Get_BackupJob_Names() ); $smarty->assign('pools', $dbSql->GetVolumeList() ); // Last 24 hours completed jobs number (last_run_report.tpl) -$completed_jobs = $dbSql->GetLastJobs(); -$smarty->assign( 'completed_jobs', $completed_jobs['completed_jobs'] ); +//$completed_jobs = $dbSql->GetLastJobs(); +//$smarty->assign( 'completed_jobs', $completed_jobs['completed_jobs'] ); + +// Last 24 hours completed jobs number (last_run_report.tpl) +$completed_jobs = $dbSql->CountLastJobs( LAST_DAY, 'completed' ); +$smarty->assign( 'completed_jobs', $completed_jobs['job_nb'] ); // Last 24 hours failed jobs number (last_run_report.tpl) -$failed_jobs = $dbSql->GetLastErrorJobs(); -$smarty->assign( 'failed_jobs', $failed_jobs['failed_jobs'] ); +$failed_jobs = $dbSql->CountLastJobs( LAST_DAY, 'failed' ); +$smarty->assign( 'failed_jobs', $failed_jobs['job_nb'] ); // Last 24 hours elapsed time (last_run_report.tpl) $smarty->assign( 'elapsed_jobs', $dbSql->Get_ElapsedTime_Job() );