Ejemplo n.º 1
0
 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');
     }
 }
Ejemplo n.º 2
0
 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');
     }
 }
Ejemplo n.º 3
0
 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;
 }
Ejemplo n.º 4
0
 /**
  * @return FileEditor Component
  */
 protected function createComponentWhiteList()
 {
     return new FileEditor($this->serverRepo->getPath($this->selectedServerId) . 'whitelist.json', $this->fileModel, $this->user->isAllowed('server-settings', 'edit'));
 }
Ejemplo n.º 5
0
 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');
 }