]> git.sur5r.net Git - bacula/bacula/blobdiff - gui/bacula-web/jobs.php
bacula-web: Removed useless lang.php file
[bacula/bacula] / gui / bacula-web / jobs.php
index cc41205559a5c3283a88039c43fa4db10e9f268d..5fb6fafbdbb79d44e282f18a7d3b17ee6699d5c9 100644 (file)
@@ -8,8 +8,6 @@
   $smarty = new Smarty();     
   $dbSql = new Bweb();
 
-  require("lang.php");
-
   // Smarty configuration
   $smarty->compile_check = true;
   $smarty->debugging = false;
   $job_status = array( 'Any', 'Waiting', 'Running', 'Completed', 'Failed', 'Canceled' );
   $smarty->assign( 'job_status', $job_status );
   
+  // Jobs per page
+  $jobs_per_page = array( 25,50,75,100,150 );
+  $smarty->assign( 'jobs_per_page', $jobs_per_page );
+
   // Global variables
   $job_level = array( 'D' => 'Diff', 'I' => 'Incr', 'F' => 'Full' );
   
-  $query .= "SELECT Job.JobId, Job.Name AS Job_name, Job.StartTime, Job.EndTime, Job.Level, Job.JobBytes, Pool.Name, Job.JobStatus, Pool.Name AS Pool_name, Status.JobStatusLong ";
+  $query .= "SELECT Job.JobId, Job.Name AS Job_name, Job.StartTime, Job.EndTime, Job.Level, Job.JobBytes, Job.JobFiles, Pool.Name, Job.JobStatus, Pool.Name AS Pool_name, Status.JobStatusLong ";
   $query .= "FROM Job ";
   $query .= "LEFT JOIN Pool ON Job.PoolId=Pool.PoolId ";
   $query .= "LEFT JOIN Status ON Job.JobStatus = Status.JobStatus ";
                        $query .= "WHERE Job.JobStatus = 'R' ";
                break;
                case 'waiting':
-                       $query .= "WHERE Job.JobStatus IN ('F','S','M','m','s','j','c','d','t','C','R') ";
+                       $query .= "WHERE Job.JobStatus IN ('F','S','M','m','s','j','c','d','t','C') ";
                break;
                case 'completed':
                        $query .= "WHERE Job.JobStatus = 'T' ";
                break;
                case 'failed':
-                       $query .= "WHERE Job.JobStatus = 'f' ";
+                       $query .= "WHERE Job.JobStatus IN ('f','E') ";
                break;
                case 'canceled':
                        $query .= "WHERE Job.JobStatus = 'A' ";
   $query .= "ORDER BY Job.JobId DESC ";
   
   // Determine how many jobs to display
-  if( isset($_POST['limit']) )
-       $query .= "LIMIT " . $_POST['limit'];
+  if( isset($_POST['jobs_per_page']) )
+       $query .= "LIMIT " . $_POST['jobs_per_page'];
   else
-       $query .= "LIMIT 20 ";
+       $query .= "LIMIT 25 ";
   
   //echo $query . '<br />';