From 6414fe54d403efa09cf32be92f86b7930b4843c3 Mon Sep 17 00:00:00 2001 From: Davide Franco Date: Fri, 11 Mar 2011 12:17:56 +0100 Subject: [PATCH] bacula-web: Added last 24 hours stored files to main dashboard - added last 24 hours stored files - changed some variable name (more lisible now) - some php code improvments --- gui/bacula-web/index.php | 9 +++++++-- gui/bacula-web/templates/index.tpl | 6 +++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/gui/bacula-web/index.php b/gui/bacula-web/index.php index 67b7af81fb..e9a0e4cc55 100644 --- a/gui/bacula-web/index.php +++ b/gui/bacula-web/index.php @@ -71,7 +71,7 @@ $last24bytes = ""; $query = ""; // Stored files number -$totalfiles = $dbSql->GetStoredFiles(); +$totalfiles = $dbSql->GetStoredFiles( ALL ); $smarty->assign('stored_files',$totalfiles); // Database size @@ -83,7 +83,12 @@ $smarty->assign('stored_bytes', $dbSql->human_file_size($result['stored_bytes']) // Total stored bytes since last 24 hours $result = $dbSql->GetStoredBytes( LAST_DAY ); -$smarty->assign('bytes_totales', $dbSql->human_file_size($result['stored_bytes']) ); +$smarty->assign('bytes_last', $dbSql->human_file_size($result['stored_bytes']) ); + +// Total stored files since last 24 hours +$files_last = $dbSql->GetStoredFiles( LAST_DAY ); +$smarty->assign('files_last', $files_last ); + // Number of clients $nb_clients = $dbSql->Get_Nb_Clients(); diff --git a/gui/bacula-web/templates/index.tpl b/gui/bacula-web/templates/index.tpl index cc1567bf53..b31f1d3a43 100644 --- a/gui/bacula-web/templates/index.tpl +++ b/gui/bacula-web/templates/index.tpl @@ -109,7 +109,11 @@ Transferred Bytes - {$bytes_totales} + {$bytes_last} + + + Transferred Files + {$files_last} -- 2.39.5