From: Davide Franco Date: Thu, 28 Oct 2010 21:07:10 +0000 (+0200) Subject: bacula-web: Removed fsize_format tag from report.tpl X-Git-Tag: Release-5.2.1~985 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7c90d7daab1fa92af4881ab81ba330cf1fb56db4;p=bacula%2Fbacula bacula-web: Removed fsize_format tag from report.tpl - Fixed for $bytesperiod and job.JobBytes in report.php --- 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"}