]> git.sur5r.net Git - bacula/bacula/commitdiff
bacula-web: Fixed case on bacula table fields name
authorDavide Franco <bacula-dev@dflc.ch>
Sun, 26 Jun 2011 17:33:28 +0000 (19:33 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:49:17 +0000 (14:49 +0200)
gui/bacula-web/includes/bweb.inc.php
gui/bacula-web/jobs.php
gui/bacula-web/templates/jobs.tpl

index efdbbf1fc898420f66f28118f80cd21a7ea02e3d..8fd1693538c0c5f7f559dcbe7a850fbd4baffadd 100644 (file)
@@ -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;
                }
index 4fb46aa9af9477217b632975285664f5e184cd8b..b3741aa10da88dbd054ef53d73906f219d0c2ef5 100644 (file)
@@ -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;
                        $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);
          }
index 7a142bf228f899fa5a6220b781960e43cdc4c0ee..c9827cdadedc8c6c33c966d59544eb49b2d2d578 100644 (file)
                <td width="50" class="{$job.Job_classe}">
                        <img width="20" src="style/images/{$job.Job_icon}" alt="" title="{$job.JobStatusLong}" />
                </td>
-               <td class="{$job.Job_classe}">{$job.JobId}</td>
+               <td class="{$job.Job_classe}">{$job.jobid}</td>
                <td class="{$job.Job_classe}">
-                       <a href="backupjob-report.php?backupjob_name={$job.Job_name}">{$job.Job_name}</a>
+                       <a href="backupjob-report.php?backupjob_name={$job.Job_name}">{$job.job_name}</a>
                </td>
-               <td class="{$job.Job_classe}">{$job.StartTime}</td>
-               <td class="{$job.Job_classe}">{$job.EndTime}</td>
+               <td class="{$job.Job_classe}">{$job.starttime}</td>
+               <td class="{$job.Job_classe}">{$job.endtime}</td>
                <td class="{$job.Job_classe}">{$job.elapsed_time}</td>
-               <td class="{$job.Job_classe}">{$job.Level}</td>
-               <td class="{$job.Job_classe}">{$job.JobBytes}</td>
-               <td class="{$job.Job_classe}">{$job.JobFiles}</td>
-               <td class="{$job.Job_classe}">{$job.Pool_name}</td>
+               <td class="{$job.Job_classe}">{$job.level}</td>
+               <td class="{$job.Job_classe}">{$job.jobbytes}</td>
+               <td class="{$job.Job_classe}">{$job.jobfiles}</td>
+               <td class="{$job.Job_classe}">{$job.pool_name}</td>
          </tr>
          {/foreach}
        </table>