From: Marcin Haba Date: Mon, 5 Jul 2021 18:07:07 +0000 (+0200) Subject: baculum: Add console page to configure consoles X-Git-Tag: Release-11.3.2~202 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcb637a8156f396d6b2e72bad78f321eb5cfbb81;p=thirdparty%2Fbacula.git baculum: Add console page to configure consoles --- diff --git a/gui/baculum/protected/Web/Data/data_desc.json b/gui/baculum/protected/Web/Data/data_desc.json index 25af95d41..8700370f9 100644 --- a/gui/baculum/protected/Web/Data/data_desc.json +++ b/gui/baculum/protected/Web/Data/data_desc.json @@ -4752,9 +4752,10 @@ }, "Director": { "Required": false, - "ValueType": "str", + "ValueType": "res", "DefaultValue": 0, - "FieldType": "TextBox", + "FieldType": "ComboBox", + "Resource": "Director", "Section": "General" }, "CommCompression": { diff --git a/gui/baculum/protected/Web/Lang/en/messages.mo b/gui/baculum/protected/Web/Lang/en/messages.mo index 9fcafd1a0..aedf50ac2 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 ccf56b638..0932befe9 100644 --- a/gui/baculum/protected/Web/Lang/en/messages.po +++ b/gui/baculum/protected/Web/Lang/en/messages.po @@ -3388,3 +3388,12 @@ msgstr "Graphical director status is supported for Bacula directors version 9.0 msgid "Status request timed out. The most probably the Bacula director is not available or it is not running." msgstr "Status request timed out. The most probably the Bacula director is not available or it is not running." + +msgid "To use the console page please configure bbconsjson binary file path on the API side." +msgstr "To use the console page please configure bbconsjson binary file path on the API side." + +msgid "Console details" +msgstr "Console details" + +msgid "Configure console" +msgstr "Configure console" diff --git a/gui/baculum/protected/Web/Lang/ja/messages.mo b/gui/baculum/protected/Web/Lang/ja/messages.mo index 2b9a12953..e3c3064bc 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 1ebb3f953..d639c1fa6 100644 --- a/gui/baculum/protected/Web/Lang/ja/messages.po +++ b/gui/baculum/protected/Web/Lang/ja/messages.po @@ -3474,3 +3474,12 @@ msgstr "Graphical director status is supported for Bacula directors version 9.0 msgid "Status request timed out. The most probably the Bacula director is not available or it is not running." msgstr "Status request timed out. The most probably the Bacula director is not available or it is not running." + +msgid "To use the console page please configure bbconsjson binary file path on the API side." +msgstr "To use the console page please configure bbconsjson binary file path on the API side." + +msgid "Console details" +msgstr "Console details" + +msgid "Configure console" +msgstr "Configure console" diff --git a/gui/baculum/protected/Web/Lang/pl/messages.mo b/gui/baculum/protected/Web/Lang/pl/messages.mo index ee25f0921..d236c6683 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 3d72a8a0f..8ad4d3ca6 100644 --- a/gui/baculum/protected/Web/Lang/pl/messages.po +++ b/gui/baculum/protected/Web/Lang/pl/messages.po @@ -3398,3 +3398,12 @@ msgstr "Graficzny status zarządcy jest wspierany od wersji zarządcy Bacula 9.0 msgid "Status request timed out. The most probably the Bacula director is not available or it is not running." msgstr "Upłynął limit czasu żądania statusu. Najprawdopodobniej zarządca Bacula nie jest dostępny lub nie jest uruchomiony." + +msgid "To use the console page please configure bbconsjson binary file path on the API side." +msgstr "Aby używać tej strony konsoli, proszę skonfigurować po stronie API lokalizację pliku binarnego bbconsjson." + +msgid "Console details" +msgstr "Szczegóły konsoli" + +msgid "Configure console" +msgstr "Konfiguruj konsolę" diff --git a/gui/baculum/protected/Web/Lang/pt/messages.mo b/gui/baculum/protected/Web/Lang/pt/messages.mo index 0aa747f14..50cea213a 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 59382ae33..2fb7b7ca6 100644 --- a/gui/baculum/protected/Web/Lang/pt/messages.po +++ b/gui/baculum/protected/Web/Lang/pt/messages.po @@ -3398,3 +3398,12 @@ msgstr "Graphical director status is supported for Bacula directors version 9.0 msgid "Status request timed out. The most probably the Bacula director is not available or it is not running." msgstr "Status request timed out. The most probably the Bacula director is not available or it is not running." + +msgid "To use the console page please configure bbconsjson binary file path on the API side." +msgstr "To use the console page please configure bbconsjson binary file path on the API side." + +msgid "Console details" +msgstr "Console details" + +msgid "Configure console" +msgstr "Configure console" diff --git a/gui/baculum/protected/Web/Lang/ru/messages.mo b/gui/baculum/protected/Web/Lang/ru/messages.mo index 410cbb1d5..3067275e1 100644 Binary files a/gui/baculum/protected/Web/Lang/ru/messages.mo and b/gui/baculum/protected/Web/Lang/ru/messages.mo differ diff --git a/gui/baculum/protected/Web/Lang/ru/messages.po b/gui/baculum/protected/Web/Lang/ru/messages.po index 052587ccc..a33cdada7 100644 --- a/gui/baculum/protected/Web/Lang/ru/messages.po +++ b/gui/baculum/protected/Web/Lang/ru/messages.po @@ -3398,3 +3398,12 @@ msgstr "Graphical director status is supported for Bacula directors version 9.0 msgid "Status request timed out. The most probably the Bacula director is not available or it is not running." msgstr "Status request timed out. The most probably the Bacula director is not available or it is not running." + +msgid "To use the console page please configure bbconsjson binary file path on the API side." +msgstr "To use the console page please configure bbconsjson binary file path on the API side." + +msgid "Console details" +msgstr "Console details" + +msgid "Configure console" +msgstr "Configure console" diff --git a/gui/baculum/protected/Web/Pages/ConsoleView.page b/gui/baculum/protected/Web/Pages/ConsoleView.page new file mode 100644 index 000000000..5141717a5 --- /dev/null +++ b/gui/baculum/protected/Web/Pages/ConsoleView.page @@ -0,0 +1,45 @@ +<%@ MasterClass="Application.Web.Layouts.Main" Theme="Baculum-v2"%> + + +
+
+ <%[ Console details ]%> +
+
+ + + + +
diff --git a/gui/baculum/protected/Web/Pages/ConsoleView.php b/gui/baculum/protected/Web/Pages/ConsoleView.php new file mode 100644 index 000000000..dbb66763c --- /dev/null +++ b/gui/baculum/protected/Web/Pages/ConsoleView.php @@ -0,0 +1,57 @@ + + * @category Page + * @package Baculum Web + */ +class ConsoleView extends BaculumWebPage { + + public function onInit($param) { + parent::onInit($param); + if ($this->IsCallBack || $this->IsPostBack) { + return; + } + /** + * NOTE: component name is not used here, set only for compatibility + * with BaculaConfigDirectives. + */ + $this->ConsoleResourcesConfig->setComponentName($_SESSION['director']); + } + + public function loadConsoleResourcesConfig($sender, $param) { + $resource_type = $param->getCallbackParameter(); + if (!empty($resource_type)) { + $this->ConsoleResourcesConfig->setResourceType($resource_type); + $this->ConsoleResourcesConfig->loadResourceListTable(); + } else { + $this->ConsoleResourcesConfig->showError(true); + } + } +} +?> diff --git a/gui/baculum/protected/Web/Portlets/MainSideBar.tpl b/gui/baculum/protected/Web/Portlets/MainSideBar.tpl index 8da2bb4ed..12b17d802 100644 --- a/gui/baculum/protected/Web/Portlets/MainSideBar.tpl +++ b/gui/baculum/protected/Web/Portlets/MainSideBar.tpl @@ -54,7 +54,7 @@   <%[ Volumes ]%>   <%[ FileSets ]%>   <%[ Schedules ]%> -   <%[ Configure ]%> +   <%[ Console ]%>   <%[ Restore wizard ]%>   <%[ Graphs ]%>   <%[ Statistics ]%> diff --git a/gui/baculum/protected/Web/endpoints.xml b/gui/baculum/protected/Web/endpoints.xml index 395eeede6..1e218c639 100644 --- a/gui/baculum/protected/Web/endpoints.xml +++ b/gui/baculum/protected/Web/endpoints.xml @@ -30,10 +30,10 @@ - + - +