From ba31f9959779fc319330cb1a783e3595849e9276 Mon Sep 17 00:00:00 2001 From: Davide Franco Date: Mon, 17 Jan 2011 14:01:35 +0100 Subject: [PATCH] bacula-web: Added last 24 hours waiting jobs in main dashboard --- gui/bacula-web/bweb.inc.php | 3 +++ gui/bacula-web/index.php | 7 +++++-- gui/bacula-web/templates/index.tpl | 5 +++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gui/bacula-web/bweb.inc.php b/gui/bacula-web/bweb.inc.php index 51f46aed0f..c3ab7cc6af 100644 --- a/gui/bacula-web/bweb.inc.php +++ b/gui/bacula-web/bweb.inc.php @@ -371,6 +371,9 @@ class Bweb extends DB { case 'canceled': $where_status = "JobStatus = 'A' "; break; + case 'waiting': + $where_status = "JobStatus IN ('F','S','M','m','s','j','c','d','t') "; + break; } // end switch } diff --git a/gui/bacula-web/index.php b/gui/bacula-web/index.php index a393723a0e..73c1b6abd2 100644 --- a/gui/bacula-web/index.php +++ b/gui/bacula-web/index.php @@ -95,12 +95,15 @@ $smarty->assign( 'total_name_jobs', $dbSql->Get_BackupJob_Names() ); // Get volumes list (volumes.tpl) $smarty->assign('pools', $dbSql->GetVolumeList() ); -// Last 24 hours completed jobs number (last_run_report.tpl) +// Last 24 hours completed jobs number $smarty->assign( 'completed_jobs', $dbSql->CountJobs( LAST_DAY, 'completed' ) ); -// Last 24 hours failed jobs number (last_run_report.tpl) +// Last 24 hours failed jobs number $smarty->assign( 'failed_jobs', $dbSql->CountJobs( LAST_DAY, 'failed' ) ); +// Last 24 hours waiting jobs number +$smarty->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() ); diff --git a/gui/bacula-web/templates/index.tpl b/gui/bacula-web/templates/index.tpl index b7387c5d5e..eae6e4b404 100644 --- a/gui/bacula-web/templates/index.tpl +++ b/gui/bacula-web/templates/index.tpl @@ -78,6 +78,11 @@ {$completed_jobs} View + + Waiting jobs + {$waiting_jobs} + View +