},
"Director": {
"Required": false,
- "ValueType": "str",
+ "ValueType": "res",
"DefaultValue": 0,
- "FieldType": "TextBox",
+ "FieldType": "ComboBox",
+ "Resource": "Director",
"Section": "General"
},
"CommCompression": {
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"
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"
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ę"
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"
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"
--- /dev/null
+<%@ MasterClass="Application.Web.Layouts.Main" Theme="Baculum-v2"%>
+<com:TContent ID="Main">
+ <!-- Header -->
+ <header class="w3-container">
+ <h5>
+ <b><i class="fa fa-laptop-code"></i> <%[ Console details ]%></b>
+ </h5>
+ </header>
+ <div class="w3-bar w3-green w3-margin-bottom">
+ <a id="btn_console_config" href="javascript:void(0)" class="w3-bar-item w3-button tab_btn w3-gray" onclick="load_cons_res_config('Director'); W3Tabs.open(this.id, 'console_config');"<%=empty($_SESSION['bcons']) ? ' style="display: none"': ''%>>
+ <%[ Configure console ]%>
+ </a>
+ </div>
+ <p class="info"<%=!empty($_SESSION['bcons']) ? ' style="display: none"': ''%>><%[ To use the console page please configure bbconsjson binary file path on the API side. ]%></p>
+ <div class="w3-container tab_item" id="console_config"<%=empty($_SESSION['bcons']) ? ' style="display: none"': ''%>>
+ <com:TCallback ID="LoadConsoleResourcesConfig" OnCallback="loadConsoleResourcesConfig" />
+ <script>
+function load_cons_res_config(resource) {
+ var cb = <%=$this->LoadConsoleResourcesConfig->ActiveControl->Javascript%>;
+ cb.setCallbackParameter(resource);
+ cb.dispatch();
+}
+ </script>
+ <div class="w3-row w3-margin-bottom">
+ <a href="javascript:void(0)" onclick="load_cons_res_config('Director'); W3SubTabs.open('console_director_config_btn', 'console_resources_config_form', 'console_config');">
+ <div id="console_director_config_btn" class="subtab_btn w3-col m1 w3-bottombar w3-hover-light-grey w3-padding w3-border-red">Director</div>
+ </a>
+ <a href="javascript:void(0)" onclick="load_cons_res_config('Console'); W3SubTabs.open('console_console_config_btn', 'console_resources_config_form', 'console_config');">
+ <div id="console_console_config_btn" class="subtab_btn w3-col m1 w3-bottombar w3-hover-light-grey w3-padding">Console</div>
+ </a>
+ </div>
+ <div id="console_resources_config_form" class="subtab_item"<%=empty($_SESSION['bcons']) ? ' style="display: none"': ''%>>
+ <com:Application.Web.Portlets.BaculaConfigResourceList
+ ID="ConsoleResourcesConfig"
+ ComponentType="bcons"
+ ResourceList="<%=[[ 'name' => 'Name', 'label' => 'Name' ]]%>"
+ />
+ </div>
+ </div>
+<script>
+$(function() {
+ <%=!empty($_SESSION['bcons']) ? 'load_cons_res_config("Director");': ''%>
+});
+</script>
+</com:TContent>
--- /dev/null
+<?php
+/*
+ * Bacula(R) - The Network Backup Solution
+ * Baculum - Bacula web interface
+ *
+ * Copyright (C) 2013-2021 Kern Sibbald
+ *
+ * The main author of Baculum is Marcin Haba.
+ * The original author of Bacula is Kern Sibbald, with contributions
+ * from many others, a complete list can be found in the file AUTHORS.
+ *
+ * You may use this file and others of this release according to the
+ * license defined in the LICENSE file, which includes the Affero General
+ * Public License, v3.0 ("AGPLv3") and some additional permissions and
+ * terms pursuant to its AGPLv3 Section 7.
+ *
+ * This notice must be preserved when any source code is
+ * conveyed and/or propagated.
+ *
+ * Bacula(R) is a registered trademark of Kern Sibbald.
+ */
+
+Prado::using('System.Web.UI.ActiveControls.TCallback');
+Prado::using('Application.Web.Class.BaculumWebPage');
+
+/**
+ * Console view page.
+ *
+ * @author Marcin Haba <marcin.haba@bacula.pl>
+ * @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);
+ }
+ }
+}
+?>
<a href="<%=$this->Service->constructUrl('VolumeList')%>" class="w3-bar-item w3-button w3-padding<%=in_array($this->Service->getRequestedPagePath(), array('VolumeList', 'VolumeView')) ? ' w3-blue': ''%><%=$this->getModule('users')->isPageAllowed($this->User, 'VolumeList') ? '' : ' hide'%>"><i class="fa fa-hdd fa-fw"></i> <%[ Volumes ]%></a>
<a href="<%=$this->Service->constructUrl('FileSetList')%>" class="w3-bar-item w3-button w3-padding<%=in_array($this->Service->getRequestedPagePath(), array('FileSetList', 'FileSetView')) ? ' w3-blue': ''%><%=$this->getModule('users')->isPageAllowed($this->User, 'FileSetList') ? '' : ' hide'%>"><i class="fa fa-copy fa-fw"></i> <%[ FileSets ]%></a>
<a href="<%=$this->Service->constructUrl('ScheduleList')%>" class="w3-bar-item w3-button w3-padding<%=in_array($this->Service->getRequestedPagePath(), array('ScheduleList', 'ScheduleView')) ? ' w3-blue': ''%><%=$this->getModule('users')->isPageAllowed($this->User, 'ScheduleList') ? '' : ' hide'%>"><i class="fa fa-clock fa-fw"></i> <%[ Schedules ]%></a>
- <a href="<%=$this->Service->constructUrl('ConfigureHosts')%>" class="w3-bar-item w3-button w3-padding<%=$this->Service->getRequestedPagePath() == 'ConfigureHosts' ? ' w3-blue': ''%><%=$this->getModule('users')->isPageAllowed($this->User, 'ConfigureHosts') ? '' : ' hide'%>"><i class="fa fa-cog fa-fw"></i> <%[ Configure ]%></a>
+ <a href="<%=$this->Service->constructUrl('ConsoleView')%>" class="w3-bar-item w3-button w3-padding<%=$this->Service->getRequestedPagePath() == 'ConsoleView' ? ' w3-blue': ''%><%=$this->getModule('users')->isPageAllowed($this->User, 'ConsoleView') ? '' : ' hide'%>"><i class="fa fa-laptop-code fa-fw"></i> <%[ Console ]%></a>
<a href="<%=$this->Service->constructUrl('RestoreWizard')%>" class="w3-bar-item w3-button w3-padding<%=$this->Service->getRequestedPagePath() == 'RestoreWizard' ? ' w3-blue': ''%><%=$this->getModule('users')->isPageAllowed($this->User, 'RestoreWizard') ? '' : ' hide'%>"><i class="fa fa-reply fa-fw"></i> <%[ Restore wizard ]%></a>
<a href="<%=$this->Service->constructUrl('Graphs')%>" class="w3-bar-item w3-button w3-padding<%=$this->Service->getRequestedPagePath() == 'Graphs' ? ' w3-blue': ''%><%=$this->getModule('users')->isPageAllowed($this->User, 'Graphs') ? '' : ' hide'%>"><i class="fa fa-chart-pie fa-fw"></i> <%[ Graphs ]%></a>
<a href="<%=$this->Service->constructUrl('StatisticsList')%>" class="w3-bar-item w3-button w3-padding<%=in_array($this->Service->getRequestedPagePath(), array('StatisticsList', 'StatisticsView')) ? ' w3-blue': ''%><%=$this->getModule('users')->isPageAllowed($this->User, 'StatisticsList') ? '' : ' hide'%>"><i class="fas fa-chart-line fa-fw"></i> <%[ Statistics ]%></a>
<url ServiceParameter="ScheduleStatusList" pattern="web/schedule/status/" />
<url ServiceParameter="ScheduleView" pattern="web/schedule/{schedule}/" parameters.schedule="[a-zA-Z0-9:.\-_ ]+" />
<url ServiceParameter="Graphs" pattern="web/graphs/" />
- <url ServiceParameter="Console" pattern="web/console/" />
+ <url ServiceParameter="Console" pattern="web/webconsole/" />
<url ServiceParameter="ApplicationSettings" pattern="web/settings/" />
<url ServiceParameter="Security" pattern="web/security/" />
- <url ServiceParameter="ConfigureHosts" pattern="web/configure/" />
+ <url ServiceParameter="ConsoleView" pattern="web/console/" />
<url ServiceParameter="NewResource" pattern="web/new/{component_type}/{component_name}/{resource_type}/" parameters.component_type="\w+" parameters.component_name="[a-zA-Z0-9:.\-_ ]+" parameters.resource_type="\w+" />
<url ServiceParameter="NewResource" pattern="web/new/{host}/{component_type}/{component_name}/{resource_type}/" parameters.host="[a-zA-Z0-9:.\-_ ]+" parameters.component_type="\w+" parameters.component_name="[a-zA-Z0-9:.\-_ ]+" parameters.resource_type="\w+" />
<url ServiceParameter="WebConfigWizard" pattern="web/config/" />