/** * @return ViewModel */ public function overviewAction() { $lastLoggedProcesses = $this->processLogFinder->getLastLoggedProcesses(0, 10); ProcessLogFormatter::formatProcessLogs($lastLoggedProcesses, $this->systemConfig, $this->translator); $view = new ViewModel(['processes' => $lastLoggedProcesses]); $view->setTemplate('prooph/link/monitor/process-view/overview'); return $view; }
/** * @return array|\ZF\ApiProblem\ApiProblemResponse */ public function getList() { $startMessage = $this->getRequest()->getQuery('start_message', null); if ($startMessage === null) { return $this->apiProblem(400, 'Missing required filter start_message'); } Assertion::string($startMessage); Assertion::notEmpty($startMessage); $logs = $this->processLogFinder->getLogsTriggeredBy($startMessage); return ['logs' => $logs]; }