コード例 #1
0
ファイル: MainPresenter.php プロジェクト: OCC2/occ2pacs
 /**
  * restart PACS
  * @return void
  */
 public function handleRestartPacs()
 {
     if (!$this->user->isAllowed("server", "edit")) {
         $this->flashMessage(_("You are not allowed to do this action.", "danger"));
         $this->redirect("this");
     }
     try {
         $result = $this->pacs->restart();
     } catch (ServiceAdminException $exc) {
         $this->flashMessage($exc->getMessage(), "danger");
         $this->redirect("this");
     }
     $this->flashMessage($result, "success");
     $this->redirect("this");
     return;
 }
コード例 #2
0
 /**
  * handle a process of activation of configuration
  * @return void
  */
 public function handleActivate()
 {
     if (!$this->user->isAllowed("config", "edit")) {
         $this->flashMessage(_("You are not allowed to do this action."), "danger");
         $this->redirect("this");
     }
     $acrNemaPath = $this->pacsAdmin->getConfig()["pacsPath"] . $this->model->getConfig()["configFile"];
     try {
         $this->model->activateConfig($acrNemaPath);
         $result = $this->pacsAdmin->restart();
         $this->flashMessage(_("Configuration was activated.") . " " . $result, "success");
         $this->redirect("this");
     } catch (RemoteNodesException $exc) {
         $this->flashMessage($exc->getMessage(), "danger");
         $this->redirect("this");
     }
     return;
 }