Skip to content

Commit

Permalink
List only active tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
Parziphal committed Jul 30, 2016
1 parent f62efc9 commit 367ea4c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/controllers/JobTaskController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ class JobTaskController extends ApplicationController
{
public function index()
{
$this->job_tasks = JobTask::order("id DESC")->paginate($this->page_number(), 25);
$activeTypes = "'" . implode("', '", CONFIG()->active_job_tasks) . "'";
$this->job_tasks = JobTask::order("id DESC")->where("task_type IN ($activeTypes)")->paginate($this->page_number(), 25);
}

public function show()
Expand Down Expand Up @@ -34,7 +35,7 @@ public function restart()
$this->redirectTo(['action' => "show", 'id' => $this->job_task->id]);
}
}

protected function filters()
{
return [
Expand Down

0 comments on commit 367ea4c

Please sign in to comment.