From d89c86e8fb3b30763f728a693e5ac5554b87aeaa Mon Sep 17 00:00:00 2001 From: Davide Franco Date: Mon, 27 Jun 2011 16:04:29 +0200 Subject: [PATCH] bacula-web: Fixed job fields in index template - Improved db error exception in index.php --- gui/bacula-web/index.php | 3 ++- gui/bacula-web/templates/index.tpl | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gui/bacula-web/index.php b/gui/bacula-web/index.php index 15a66510b3..dea1accf2e 100644 --- a/gui/bacula-web/index.php +++ b/gui/bacula-web/index.php @@ -117,6 +117,7 @@ $graph->SetYTitle( "GB" ); $graph->Render(); $dbSql->tpl->assign('graph_stored_bytes', $graph->Get_Image_file() ); + // Last 15 used volumes $vol_list = array(); @@ -129,7 +130,7 @@ $query .= "LIMIT 10 "; $result = $dbSql->db_link->query( $query ); if ( PEAR::isError( $result ) ) - die( "Unable to get last used volumes from catalog \n " . $result->getMessage() ); + $this->TriggerDBError( 'Unable to get last used volumes from catalog' . $result ); else { while ( $vol = $result->fetchRow() ) array_push( $vol_list, $vol ); diff --git a/gui/bacula-web/templates/index.tpl b/gui/bacula-web/templates/index.tpl index 1a7d9d04fb..8f7560c9c1 100644 --- a/gui/bacula-web/templates/index.tpl +++ b/gui/bacula-web/templates/index.tpl @@ -50,10 +50,10 @@ {foreach from=$volume_list item=vol} - {$vol.Volumename} - {$vol.VolStatus} - {$vol.Lastwritten} - {$vol.JobId} + {$vol.volumename} + {$vol.volstatus} + {$vol.lastwritten} + {$vol.jobid} {/foreach} -- 2.39.5