Fix recent jobs
This commit is contained in:
@@ -126,7 +126,7 @@ class Projects extends CI_Controller {
|
||||
|
||||
$data['project'] = $project;
|
||||
$data['trials'] = $this->trial->getByProjectId($id);
|
||||
$data['jobs'] = $this->job->getRecent();
|
||||
$data['jobs'] = $this->job->getRecent($id);
|
||||
|
||||
$this->load->view('projects/detail', $data);
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ class Job extends CI_Model {
|
||||
public function getRecent($projectId = '') {
|
||||
$this->db->select('jobs.*, trials.project_id, trials.name');
|
||||
$this->db->join('trials', 'jobs.trial_id = trials.id', 'left');
|
||||
$this->db->where('finished_at', 0);
|
||||
//$this->db->where('finished_at', 0);
|
||||
|
||||
if (!empty($projectId)) {
|
||||
$this->db->where('project_id', $projectId);
|
||||
|
||||
@@ -84,6 +84,7 @@
|
||||
<tr>
|
||||
<th scope="col"><?=_('Trial');?></th>
|
||||
<th scope="col"><?=_('Started');?></th>
|
||||
<th scope="col"><?=_('Finished');?></th>
|
||||
<th scope="col"><?=_('Actions');?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -95,6 +96,7 @@
|
||||
<tr>
|
||||
<td><?=$job['name'];?></td>
|
||||
<td><?=$job['started_at'];?></td>
|
||||
<td><?=$job['finished_at'] != '0000-00-00 00:00:00' ? $job['finished_at'] : _('Currently running');?></td>
|
||||
<td>
|
||||
<a href="<?=site_url('trials/results/' . $job['id']);?>" title="<?= sprintf(_('Show results for the trial "%s"'), $job['name']);?>"><?=_('Show results');?></a> |
|
||||
<a href="<?=site_url('trials/edit/' . $job['id']);?>" title="<?= sprintf(_('Edit trial "%s"'), $job['name']);?>"><?=_('Edit');?></td>
|
||||
|
||||
Reference in New Issue
Block a user