From: Marcin Haba Date: Thu, 1 Aug 2019 18:50:21 +0000 (+0200) Subject: baculum: Add component start/stop/restart actions to Web X-Git-Tag: Release-9.6.0~167 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c51fc4191f28890e2c0f8ddb08baa9e0ab6cd5ea;p=thirdparty%2Fbacula.git baculum: Add component start/stop/restart actions to Web --- diff --git a/gui/baculum/protected/API/Pages/Panel/APIInstallWizard.php b/gui/baculum/protected/API/Pages/Panel/APIInstallWizard.php index 7a507e21c..0ce83b3e4 100644 --- a/gui/baculum/protected/API/Pages/Panel/APIInstallWizard.php +++ b/gui/baculum/protected/API/Pages/Panel/APIInstallWizard.php @@ -3,7 +3,7 @@ * Bacula(R) - The Network Backup Solution * Baculum - Bacula web interface * - * Copyright (C) 2013-2018 Kern Sibbald + * Copyright (C) 2013-2019 Kern Sibbald * * The main author of Baculum is Marcin Haba. * The original author of Bacula is Kern Sibbald, with contributions diff --git a/gui/baculum/protected/Web/Lang/en/messages.mo b/gui/baculum/protected/Web/Lang/en/messages.mo index a6bacfbbc..38f61a6c6 100644 Binary files a/gui/baculum/protected/Web/Lang/en/messages.mo and b/gui/baculum/protected/Web/Lang/en/messages.mo differ diff --git a/gui/baculum/protected/Web/Lang/en/messages.po b/gui/baculum/protected/Web/Lang/en/messages.po index 5a0ba22c2..bcb9c304e 100644 --- a/gui/baculum/protected/Web/Lang/en/messages.po +++ b/gui/baculum/protected/Web/Lang/en/messages.po @@ -2293,3 +2293,24 @@ msgstr "Graphical client status is supported for Bacula clients version 9.0 and msgid "Status request timed out. The most probably the Bacula client is not available or it is not running." msgstr "Status request timed out. The most probably the Bacula client is not available or it is not running." + +msgid "Start" +msgstr "Start" + +msgid "Stop" +msgstr "Stop" + +msgid "Restart" +msgstr "Restart" + +msgid "Component action result" +msgstr "Component action result" + +msgid "Component start finished successfully." +msgstr "Component start finished successfully." + +msgid "Component stop finished successfully." +msgstr "Component stop finished successfully." + +msgid "Component restart finished successfully." +msgstr "Component restart finished successfully." diff --git a/gui/baculum/protected/Web/Lang/ja/messages.mo b/gui/baculum/protected/Web/Lang/ja/messages.mo index b3572ed1c..74b32786e 100644 Binary files a/gui/baculum/protected/Web/Lang/ja/messages.mo and b/gui/baculum/protected/Web/Lang/ja/messages.mo differ diff --git a/gui/baculum/protected/Web/Lang/ja/messages.po b/gui/baculum/protected/Web/Lang/ja/messages.po index 96bc28b99..ec3106555 100644 --- a/gui/baculum/protected/Web/Lang/ja/messages.po +++ b/gui/baculum/protected/Web/Lang/ja/messages.po @@ -2379,3 +2379,24 @@ msgstr "Graphical client status is supported for Bacula clients version 9.0 and msgid "Status request timed out. The most probably the Bacula client is not available or it is not running." msgstr "Status request timed out. The most probably the Bacula client is not available or it is not running." + +msgid "Start" +msgstr "Start" + +msgid "Stop" +msgstr "Stop" + +msgid "Restart" +msgstr "Restart" + +msgid "Component action result" +msgstr "Component action result" + +msgid "Component start finished successfully." +msgstr "Component start finished successfully." + +msgid "Component stop finished successfully." +msgstr "Component stop finished successfully." + +msgid "Component restart finished successfully." +msgstr "Component restart finished successfully." diff --git a/gui/baculum/protected/Web/Lang/pl/messages.mo b/gui/baculum/protected/Web/Lang/pl/messages.mo index b97433175..c19d884d3 100644 Binary files a/gui/baculum/protected/Web/Lang/pl/messages.mo and b/gui/baculum/protected/Web/Lang/pl/messages.mo differ diff --git a/gui/baculum/protected/Web/Lang/pl/messages.po b/gui/baculum/protected/Web/Lang/pl/messages.po index 44160a81b..6a9f5d410 100644 --- a/gui/baculum/protected/Web/Lang/pl/messages.po +++ b/gui/baculum/protected/Web/Lang/pl/messages.po @@ -2300,3 +2300,24 @@ msgstr "Graficzny status klienta jest wspierany dla klientów Bacula w wersji 9. msgid "Status request timed out. The most probably the Bacula client is not available or it is not running." msgstr "Upłynął limit czasu żądania statusu. Najprawdopodobniej klient Bacula nie jest dostępny lub nie jest uruchomiony." + +msgid "Start" +msgstr "Start" + +msgid "Stop" +msgstr "Stop" + +msgid "Restart" +msgstr "Restart" + +msgid "Component action result" +msgstr "Rezultat akcji na komponencie" + +msgid "Component start finished successfully." +msgstr "Uruchomienie komponentu zakończyło się pomyślnie." + +msgid "Component stop finished successfully." +msgstr "Zatrzymanie komponentu zakończyło się pomyślnie." + +msgid "Component restart finished successfully." +msgstr "Restart komponentu zakończył się pomyślnie." diff --git a/gui/baculum/protected/Web/Lang/pt/messages.mo b/gui/baculum/protected/Web/Lang/pt/messages.mo index bf2153324..d3e2b03f4 100644 Binary files a/gui/baculum/protected/Web/Lang/pt/messages.mo and b/gui/baculum/protected/Web/Lang/pt/messages.mo differ diff --git a/gui/baculum/protected/Web/Lang/pt/messages.po b/gui/baculum/protected/Web/Lang/pt/messages.po index bed1c3cdd..9156b9c99 100644 --- a/gui/baculum/protected/Web/Lang/pt/messages.po +++ b/gui/baculum/protected/Web/Lang/pt/messages.po @@ -2308,3 +2308,24 @@ msgstr "Graphical client status is supported for Bacula clients version 9.0 and msgid "Status request timed out. The most probably the Bacula client is not available or it is not running." msgstr "Status request timed out. The most probably the Bacula client is not available or it is not running." + +msgid "Start" +msgstr "Start" + +msgid "Stop" +msgstr "Stop" + +msgid "Restart" +msgstr "Restart" + +msgid "Component action result" +msgstr "Component action result" + +msgid "Component start finished successfully." +msgstr "Component start finished successfully." + +msgid "Component stop finished successfully." +msgstr "Component stop finished successfully." + +msgid "Component restart finished successfully." +msgstr "Component restart finished successfully." diff --git a/gui/baculum/protected/Web/Portlets/BaculaConfigComponents.php b/gui/baculum/protected/Web/Portlets/BaculaConfigComponents.php index dba176a42..f707fd18d 100644 --- a/gui/baculum/protected/Web/Portlets/BaculaConfigComponents.php +++ b/gui/baculum/protected/Web/Portlets/BaculaConfigComponents.php @@ -3,7 +3,7 @@ * Bacula(R) - The Network Backup Solution * Baculum - Bacula web interface * - * Copyright (C) 2013-2017 Kern Sibbald + * Copyright (C) 2013-2019 Kern Sibbald * * The main author of Baculum is Marcin Haba. * The original author of Bacula is Kern Sibbald, with contributions @@ -32,6 +32,8 @@ class BaculaConfigComponents extends ComponentListTemplate { const MENU_CONTROL = 'NewResourceMenu'; + const ACTIONS_CONTROL = 'ComponentActionsMenu'; + private function getConfigData($host) { $params = array('config'); $result = $this->Application->getModule('api')->get($params, $host, false); @@ -63,13 +65,16 @@ class BaculaConfigComponents extends ComponentListTemplate { } public function createComponentListElement($sender, $param) { - $controls = array(self::CHILD_CONTROL, self::MENU_CONTROL); - for ($i = 0; $i < count($controls); $i++) { - $control = $this->getChildControl($param->Item, $controls[$i]); - if (is_object($control)) { - $control->setHost($param->Item->Data['host']); - $control->setComponentType($param->Item->Data['component_type']); - $control->setComponentName($param->Item->Data['component_name']); + $conts = array(self::MENU_CONTROL, self::ACTIONS_CONTROL); + for ($i = 0; $i < count($conts); $i++) { + $controls = array(self::CHILD_CONTROL, $conts[$i]); + for ($j = 0; $j < count($controls); $j++) { + $control = $this->getChildControl($param->Item, $controls[$j]); + if (is_object($control)) { + $control->setHost($param->Item->Data['host']); + $control->setComponentType($param->Item->Data['component_type']); + $control->setComponentName($param->Item->Data['component_name']); + } } } } diff --git a/gui/baculum/protected/Web/Portlets/BaculaConfigComponents.tpl b/gui/baculum/protected/Web/Portlets/BaculaConfigComponents.tpl index 5367cc5b6..81678206a 100644 --- a/gui/baculum/protected/Web/Portlets/BaculaConfigComponents.tpl +++ b/gui/baculum/protected/Web/Portlets/BaculaConfigComponents.tpl @@ -18,8 +18,9 @@