From 7c90d7daab1fa92af4881ab81ba330cf1fb56db4 Mon Sep 17 00:00:00 2001 From: Davide Franco Date: Thu, 28 Oct 2010 23:07:10 +0200 Subject: [PATCH] bacula-web: Removed fsize_format tag from report.tpl - Fixed for $bytesperiod and job.JobBytes in report.php --- gui/bacula-web/report.php | 6 ++++-- gui/bacula-web/templates/report.tpl | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/gui/bacula-web/report.php b/gui/bacula-web/report.php index aec2cd2ebe..db2ebbddce 100644 --- a/gui/bacula-web/report.php +++ b/gui/bacula-web/report.php @@ -43,7 +43,7 @@ $bytes = $dbSql->CalculateBytesPeriod($_GET['server'],$dbSql->StartDate,$dbSql-> $files = $dbSql->CalculateFilesPeriod($_GET['server'],$dbSql->StartDate,$dbSql->EndDate); $smarty->assign('startperiod',$dbSql->StartDate); $smarty->assign('endperiod',$dbSql->EndDate); -$smarty->assign('bytesperiod',$bytes); +$smarty->assign('bytesperiod',$dbSql->human_file_size( $bytes ) ); $smarty->assign('filesperiod',$files); // Array with jobs data @@ -56,9 +56,11 @@ else if ($dbSql->driver == "pgsql") or die("Error query row 56"); while ( $tmp = $res_jobs->fetchRow(DB_FETCHMODE_ASSOC) ) { - $tdate = explode (":",$tmp['elapsed']); // Temporal "workaround" ;) Fix later + $tdate = explode (":",$tmp['elapsed']); // Temporal "workaround" ;) Fix later if ( $tdate[0] > 300000 ) $tmp['elapsed'] = "00:00:00"; + $tmp['JobBytes'] = $dbSql->human_file_size( $tmp['JobBytes'] ); + var_dump( $tmp ); array_push($a_jobs,$tmp); } $smarty->assign('jobs',$a_jobs); diff --git a/gui/bacula-web/templates/report.tpl b/gui/bacula-web/templates/report.tpl index e0dba5726e..a592ea1f4e 100644 --- a/gui/bacula-web/templates/report.tpl +++ b/gui/bacula-web/templates/report.tpl @@ -29,7 +29,7 @@ {t}Bytes transferred in the period:{/t} - {$bytesperiod|fsize_format} + {$bytesperiod} @@ -78,7 +78,7 @@ {$jobs[job].StartTime} {$jobs[job].elapsed} {$jobs[job].Level} - {$jobs[job].JobBytes|fsize_format} + {$jobs[job].JobBytes} {if $jobs[job].JobStatus eq "T"} -- 2.39.5