From b2c997efa06e92c35527d895d87cda2cfde0728d Mon Sep 17 00:00:00 2001 From: Davide Franco Date: Sun, 26 Jun 2011 19:33:28 +0200 Subject: [PATCH] bacula-web: Fixed case on bacula table fields name --- gui/bacula-web/includes/bweb.inc.php | 8 ++++---- gui/bacula-web/jobs.php | 10 +++++----- gui/bacula-web/templates/jobs.tpl | 16 ++++++++-------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/gui/bacula-web/includes/bweb.inc.php b/gui/bacula-web/includes/bweb.inc.php index efdbbf1fc8..8fd1693538 100644 --- a/gui/bacula-web/includes/bweb.inc.php +++ b/gui/bacula-web/includes/bweb.inc.php @@ -331,16 +331,16 @@ class Bweb extends DB public function Get_BackupJob_Names() { - $query = "SELECT Name FROM Job GROUP BY Name"; + $query = "SELECT job.name FROM job GROUP BY job.name"; $backupjobs = array(); $result = $this->db_link->query( $query ); if (PEAR::isError( $result ) ) { - die("Unable to get BackupJobs list from catalog" ); + $this->TriggerDBError("Unable to get BackupJobs list from catalog", $result ); }else{ - while( $backupjob = $result->fetchRow( DB_FETCHMODE_ASSOC ) ) { - array_push( $backupjobs, $backupjob["Name"] ); + while( $backupjob = $result->fetchRow() ) { + array_push( $backupjobs, $backupjob["name"] ); } return $backupjobs; } diff --git a/gui/bacula-web/jobs.php b/gui/bacula-web/jobs.php index 4fb46aa9af..b3741aa10d 100644 --- a/gui/bacula-web/jobs.php +++ b/gui/bacula-web/jobs.php @@ -80,7 +80,7 @@ while( $job = $jobsresult->fetchRow( DB_FETCHMODE_ASSOC ) ) { // Determine icon for job status - switch( $job['JobStatus'] ) { + switch( $job['jobstatus'] ) { case J_RUNNING: $job['Job_icon'] = "running.png"; break; @@ -115,15 +115,15 @@ $job['Job_classe'] = 'odd'; // Elapsed time for the job - $start = $job['StartTime']; - $end = $job['EndTime']; + $start = $job['starttime']; + $end = $job['endtime']; // Job execution execution time $job['elapsed_time'] = CTimeUtils::Get_Elapsed_Time( $start, $end); // Job Level - $job['Level'] = $job_level[ $job['Level'] ]; + $job['Level'] = $job_level[ $job['level'] ]; // Job Size - $job['JobBytes'] = CUtils::Get_Human_Size( $job['JobBytes'] ); + $job['JobBytes'] = CUtils::Get_Human_Size( $job['jobbytes'] ); array_push( $last_jobs, $job); } diff --git a/gui/bacula-web/templates/jobs.tpl b/gui/bacula-web/templates/jobs.tpl index 7a142bf228..c9827cdade 100644 --- a/gui/bacula-web/templates/jobs.tpl +++ b/gui/bacula-web/templates/jobs.tpl @@ -69,17 +69,17 @@ - {$job.JobId} + {$job.jobid} - {$job.Job_name} + {$job.job_name} - {$job.StartTime} - {$job.EndTime} + {$job.starttime} + {$job.endtime} {$job.elapsed_time} - {$job.Level} - {$job.JobBytes} - {$job.JobFiles} - {$job.Pool_name} + {$job.level} + {$job.jobbytes} + {$job.jobfiles} + {$job.pool_name} {/foreach} -- 2.39.5