]> git.sur5r.net Git - bacula/bacula/commitdiff
bacula-web: Removed fsize_format tag from report.tpl
authorDavide Franco <bacula-dev@dflc.ch>
Thu, 28 Oct 2010 21:07:10 +0000 (23:07 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Tue, 2 Nov 2010 07:20:32 +0000 (08:20 +0100)
  - Fixed for $bytesperiod and job.JobBytes in report.php

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

index aec2cd2ebe73e3514fd659dc5b4f9c58194847e2..db2ebbddce82b8af4b39e4afe36737cf6403bd87 100644 (file)
@@ -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);
index e0dba5726e69c774243f227098edeacfdabadd1c..a592ea1f4e94b058c0ef04da72c2574b14ecdd8a 100644 (file)
@@ -29,7 +29,7 @@
                                                {t}Bytes transferred in the period:{/t}
                                        </td>
                                        <td align=right width=15% class=table2>
-                                               {$bytesperiod|fsize_format}
+                                               {$bytesperiod}
                                        </td>
                                </tr>
                                <tr>
@@ -78,7 +78,7 @@
                                        <td {popup caption="Sheduled time" text=$jobs[job].SchedTime}>{$jobs[job].StartTime}</td>
                                        <td {popup autostatus=yes caption="EndTime" text=$jobs[job].EndTime}>{$jobs[job].elapsed}</td>
                                        <td align=center>{$jobs[job].Level}</td>
-                                       <td align=right>{$jobs[job].JobBytes|fsize_format}</td>
+                                       <td align=right>{$jobs[job].JobBytes}</td>
                                        <td align=center width=1%>
                                                {if $jobs[job].JobStatus eq "T"}
                                                        <img src={#root#}/images/s_ok.gif>