From 6edbbbd6790ecc9ca46895ad8df9fc2a62abe6a8 Mon Sep 17 00:00:00 2001 From: Davide Franco Date: Mon, 13 Dec 2010 15:42:18 +0100 Subject: [PATCH] bacula-web: Last 7 days transfered bytes graph in GigaBytes --- gui/bacula-web/bweb.inc.php | 7 +++++-- gui/bacula-web/templates/index.tpl | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) 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)

-- 2.39.2