]> git.sur5r.net Git - bacula/bacula/commitdiff
bacula-web: Added last 24 hours stored files to main dashboard
authorDavide Franco <bacula-dev@dflc.ch>
Fri, 11 Mar 2011 11:17:56 +0000 (12:17 +0100)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:49:07 +0000 (14:49 +0200)
 - added last 24 hours stored files
 - changed some variable name (more lisible now)
 - some php code improvments

gui/bacula-web/index.php
gui/bacula-web/templates/index.tpl

index 67b7af81fb897c386d465bc4aa7944e8b4aeff38..e9a0e4cc555e862d718bf4d46b9ded912d4eeddd 100644 (file)
@@ -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();
index cc1567bf53b3ac7e367c25d0302bab233ffe3930..b31f1d3a43d968f215d94192fc38780bc202b1d4 100644 (file)
                        </tr>
                        <tr>
                                <td class="label">Transferred Bytes</td> 
-                               <td class="info">{$bytes_totales}</td>
+                               <td class="info">{$bytes_last}</td>
+                       </tr>
+                       <tr>
+                               <td class="label">Transferred Files</td> 
+                               <td class="info">{$files_last}</td>
                        </tr>
                </table>
   </div> <!-- end div box -->