diff --git a/application/models/Job.php b/application/models/Job.php index 40156e27..d9d09733 100755 --- a/application/models/Job.php +++ b/application/models/Job.php @@ -746,8 +746,8 @@ function getSelectFilteredJob($date_begin, $time_begin, $date_end, $time_end, $select->joinLeft(array('c' => 'Client'), 'j.ClientId = c.ClientId', array('ClientName' => 'c.Name')); $select->joinLeft(array('p' => 'Pool'), 'j.PoolId = p.PoolId', array('PoolName' => 'p.Name')); $select->joinLeft(array('f' => 'FileSet'), 'j.FileSetId = f.FileSetId', array('FileSet')); - $select->joinLeft(array('sd'=> 'webacula_jobdesc'), 'j.Name = sd.name_job'); - + $select->joinLeft(array('sd'=> 'webacula_jobdesc'), 'j.Name = sd.name_job'); + $select->joinLeft(array('wjs'=> 'webacula_job_size'), 'j.JobId = wjs.JobId', array('FileSize' => 'FileSize')); $select->where( "('" . $date_begin . ' ' . $time_begin . "' <= j.StartTime) AND (j.StartTime <= '" . $date_end . ' ' . $time_end . "')" ); @@ -857,6 +857,7 @@ function getByJobId($jobid) $select->joinLeft(array('p' => 'Pool'), 'j.PoolId = p.PoolId', array('PoolName' => 'Name')); $select->joinLeft(array('f' => 'FileSet'), 'j.FileSetId = f.FileSetId', array('FileSet')); $select->joinLeft(array('sd'=> 'webacula_jobdesc'), 'j.Name = sd.name_job'); + $select->joinLeft(array('wjs'=> 'webacula_job_size'), 'j.JobId = wjs.JobId', array('FileSize' => 'FileSize')); $select->where("j.JobId = '$jobid'"); $select->order(array("StartTime", "JobId")); //$sql = $select->__toString(); echo "
$sql"; exit; // for !!!debug!!! @@ -917,6 +918,7 @@ function getByJobName($jobname) $select->joinLeft(array('p' => 'Pool'), 'j.PoolId = p.PoolId', array('PoolName' => 'Name')); $select->joinLeft(array('f' => 'FileSet'), 'j.FileSetId = f.FileSetId', array('FileSet')); $select->joinLeft(array('sd'=> 'webacula_jobdesc'), 'j.Name = sd.name_job'); + $select->joinLeft(array('wjs'=> 'webacula_job_size'), 'j.JobId = wjs.JobId', array('FileSize' => 'FileSize')); $select->where("j.Name = '$jobname'"); $select->order(array("StartTime desc", "JobId desc")); //$sql = $select->__toString(); echo "
$sql"; exit; // for !!!debug!!! @@ -974,6 +976,7 @@ function getByVolumeName($volname) $select->joinLeft(array('o' => 'JobMedia'), 'j.JobId = o.JobId', array('JobId')); $select->joinLeft(array('m' => 'Media'), 'm.MediaId = o.MediaId', array('MediaId')); $select->joinLeft(array('sd'=> 'webacula_jobdesc'), 'j.Name = sd.name_job'); + $select->joinLeft(array('wjs'=> 'webacula_job_size'), 'j.JobId = wjs.JobId', array('FileSize' => 'FileSize')); $select->where("m.VolumeName = '$volname'"); $select->order(array("StartTime", "j.JobId")); @@ -1139,6 +1142,7 @@ function getLastJobRun($numjob) $select->joinInner(array('s' => 'Status'), "j.JobStatus = s.JobStatus" , array('jobstatuslong'=>'JobStatusLong')); break; } + $select->joinLeft(array('wjs'=> 'webacula_job_size'), 'j.JobId = wjs.JobId', array('FileSize' => 'FileSize')); $select->where("j.JobStatus IN ('T', 'E', 'e', 'f', 'A', 'W', 'D')"); $select->where("j.Type = 'B'"); $select->order(array("sortStartTime DESC")); @@ -1396,6 +1400,7 @@ function getJobBeforeDate($date_before, $client_id_from, $file_set) " ORDER BY Job.StartTime ASC"; break; } + //echo "
$sql"; exit; // for !!!debug!!! $stmt = $this->db->query($sql); $ajob_inc = $stmt->fetchAll(); unset($stmt); diff --git a/application/views/scripts/job/find-filters.phtml b/application/views/scripts/job/find-filters.phtml index 3d9bb29f..e97c3907 100755 --- a/application/views/scripts/job/find-filters.phtml +++ b/application/views/scripts/job/find-filters.phtml @@ -13,7 +13,7 @@ ?>