public function renderDefault() { $params = $this->serverRepo->getRunParams($this->selectedServerId); $this->template->address = $this->hostIp . ":" . $params['port']; try { $logModel = new LogModel($params['path'] . 'logs/'); $this->template->logs = LogModel::makeColorful($logModel->getAll()); } catch (UnexpectedValueException $e) { $this->template->logs = array('nic nenalezeno'); } }
public function renderStarted() { $path = $this->serverRepo->getPath($this->selectedServerId); try { $logModel = new LogModel($path . 'logs/'); $this->template->logs = LogModel::makeColorful($logModel->getAll(8)); } catch (UnexpectedValueException $e) { $this->template->logs = array('nic nenalezeno'); } }
public function beforeRender() { $serversIds = array_keys($this->permRepo->getPermissions($this->user->id)); if ($this->selectedServerId != 0) { $srvname = $this->serverRepo->findBy(array('id' => $this->selectedServerId))->fetch(); $this->template->activeServer = $srvname->name; } else { $this->template->activeServer = NULL; } $this->template->userServers = $this->serverRepo->findBy(array('id' => $serversIds)); $this->template->running = $this->runtimeHash != NULL ? TRUE : FALSE; }
/** * @return FileEditor Component */ protected function createComponentWhiteList() { return new FileEditor($this->serverRepo->getPath($this->selectedServerId) . 'whitelist.json', $this->fileModel, $this->user->isAllowed('server-settings', 'edit')); }
public function renderSummary() { $this->template->params = $this->serverRepo->getRunParams($this->selectedServerId); $this->template->hostIp = $this->hostIp; $this->flashMessage("Server byl úspěšně vytvořen. Níže jsou nějaké detaily, které se mohou hodit.", 'success'); }