/** * Allows the UI to poll for the latest running and pending builds. */ public function latest() { $rtn = array('pending' => $this->formatBuilds($this->buildStore->getByStatus(Build::STATUS_NEW)), 'running' => $this->formatBuilds($this->buildStore->getByStatus(Build::STATUS_RUNNING))); $response = new JsonResponse(); $response->setContent($rtn); return $response; }
/** * Allows the UI to poll for the latest running and pending builds. */ public function latest() { $rtn = array('pending' => $this->formatBuilds($this->buildStore->getByStatus(Build::STATUS_NEW)), 'running' => $this->formatBuilds($this->buildStore->getByStatus(Build::STATUS_RUNNING))); if ($this->request->isAjax()) { die(json_encode($rtn)); } }