예제 #1
0
 /**
  * @param $id
  * @return \Illuminate\Contracts\View\View
  */
 public function show($id)
 {
     $job = $this->jobRepo->findById($id);
     $referenced = $this->jobRepo->latest(10, [['reference', '=', $job->reference], ['id', '!=', $job->id], ['reference', 'NOT NULL'], ['reference', '!=', '']]);
     $logs = $this->logRepo->filter([['job_id', $job->id]], 'id');
     return \View::make('connector::job.show', ['job' => $job, 'presenter' => new JobPresenter($job), 'referenced' => $referenced, 'logs' => $logs]);
 }
예제 #2
0
 /**
  * @param $jobId
  * @param $stageId
  * @return \Illuminate\Contracts\View\View
  */
 public function show($jobId, $stageId)
 {
     $stage = $this->stageRepo->findById($stageId);
     $previous = $this->stageRepo->getPrecedingStage($stage);
     if ($previous === null) {
         $previous = $this->jobRepo->findById($stage->job_id);
     }
     $logs = $this->logRepo->filter([['job_id', $stage->job_id], ['stage', $stage->stage]], 'id');
     return \View::make('connector::stage.show', ['stage' => new StagePresenter($stage), 'previous' => $previous, 'logs' => $logs]);
 }