$graph->SetGraphSize( 400, 230 );
$graph->Render();
- $smarty->assign('graph_stored_files', $graph->Get_Image_file() );
+ $smarty->assign('graph_stored_files', $graph->Get_Image_file() );
+
+ // Last 10 jobs
+ $query = "SELECT JobId, Level, JobFiles, JobBytes, JobStatus, EndTime, Name ";
+ $query .= "FROM Job ";
+ $query .= "WHERE Name = '$backupjob_name' ";
+ $query .= "ORDER BY EndTime DESC ";
+ $query .= "LIMIT 10 ";
+
+ $jobs = array();
+ $joblevel = array( 'I' => 'Incr', 'D' => 'Diff', 'F' => 'Full' );
+ $result = $dbSql->db_link->query( $query );
+
+ if( ! PEAR::isError( $result ) )
+ {
+ while( $job = $result->fetchRow( DB_FETCHMODE_ASSOC ) ) {
+ $job['Level'] = $joblevel[ $job['Level'] ];
+ array_push( $jobs, $job);
+ }
+
+ }else
+ die( "Unable to get last jobs from catalog " . $result->getMessage() );
+
+ $smarty->assign('jobs', $jobs );
$smarty->assign('backupjob_name', $backupjob_name );
$smarty->assign('backupjob_period', $backupjob_period );
<!-- Last jobs list -->
<div class="box">
<p class="title">Last jobs</p>
+
+ <table>
+ <tr>
+ <td class="tbl_header">Job Id</td>
+ <td class="tbl_header">Level</td>
+ <td class="tbl_header">Files</td>
+ <td class="tbl_header">Bytes</td>
+ <td class="tbl_header">End time</td>
+ </tr>
+ {foreach from=$jobs item=job}
+ <tr>
+ <td>{$job.JobId}</td>
+ <td>{$job.Level}</td>
+ <td>{$job.JobFiles}</td>
+ <td>{$job.JobBytes}</td>
+ <td>{$job.EndTime}</td>
+ </tr>
+ {/foreach}
+ </table>
</div> <!-- end div class=box -->
<!-- Transfered Bytes graph -->