From: Davide Franco Date: Mon, 13 Dec 2010 14:42:18 +0000 (+0100) Subject: bacula-web: Last 7 days transfered bytes graph in GigaBytes X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f8af7da3552822059ef9622175c6f88f6d371152;p=bacula%2Fbacula bacula-web: Last 7 days transfered bytes graph in GigaBytes --- diff --git a/gui/bacula-web/bweb.inc.php b/gui/bacula-web/bweb.inc.php index 2b544a5c8c..cab8ed40f7 100644 --- a/gui/bacula-web/bweb.inc.php +++ b/gui/bacula-web/bweb.inc.php @@ -598,8 +598,11 @@ class Bweb extends DB { $day = date( "d/m", strtotime($end_date) ); - if( isset( $tmp['stored_bytes'] ) ) - $stored_bytes = $tmp['stored_bytes']; + if( isset( $tmp['stored_bytes'] ) ) { + $hbytes = $this->human_file_size( $tmp['stored_bytes'], 3); + $hbytes = explode( " ", $hbytes ); + $stored_bytes = $hbytes[0]; + } return array( $day, $stored_bytes ); } diff --git a/gui/bacula-web/templates/index.tpl b/gui/bacula-web/templates/index.tpl index 95820a5318..83047b9fde 100644 --- a/gui/bacula-web/templates/index.tpl +++ b/gui/bacula-web/templates/index.tpl @@ -47,7 +47,7 @@
-

Total stored bytes (last 7 days)

+

Stored Bytes (GB / Last 7 days)