]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
baculum: Add capability to use pre-defined paths in API config wizard - idea proposed...
authorMarcin Haba <marcin.haba@bacula.pl>
Sun, 10 Oct 2021 09:42:04 +0000 (11:42 +0200)
committerMarcin Haba <marcin.haba@bacula.pl>
Sun, 10 Oct 2021 09:42:04 +0000 (11:42 +0200)
gui/baculum/protected/API/Lang/en/messages.mo
gui/baculum/protected/API/Lang/en/messages.po
gui/baculum/protected/API/Lang/pl/messages.mo
gui/baculum/protected/API/Lang/pl/messages.po
gui/baculum/protected/API/Lang/pt/messages.mo
gui/baculum/protected/API/Lang/pt/messages.po
gui/baculum/protected/API/Lang/ru/messages.mo
gui/baculum/protected/API/Lang/ru/messages.po
gui/baculum/protected/API/Pages/Panel/APIInstallWizard.page

index 5dd6c02695342e8ac2e81d0ca20b46506b24a451..d00e4cca8bed78257a077ade6edf708e2f17b42c 100644 (file)
Binary files a/gui/baculum/protected/API/Lang/en/messages.mo and b/gui/baculum/protected/API/Lang/en/messages.mo differ
index a4c21f978ed42f10bd02b5b000f878a732a1095d..a001c3226b28f8b5cbd78c14e8f227e5a6f5d04c 100644 (file)
@@ -674,3 +674,14 @@ msgstr "No data available in table"
 msgid "Search:"
 msgstr "Search:"
 
+msgid "Get pre-defined paths:"
+msgstr "Get pre-defined paths:"
+
+msgid "Select paths"
+msgstr "Select paths"
+
+msgid "Binaries:"
+msgstr "Binaries:"
+
+msgid "Configs:"
+msgstr "Configs:"
index 2d4d6ca5cefa2ac6ab6eee28bda31c9fa28c50dd..b1faff5726b40b6f088cd7503e179cd277bc4894 100644 (file)
Binary files a/gui/baculum/protected/API/Lang/pl/messages.mo and b/gui/baculum/protected/API/Lang/pl/messages.mo differ
index c38d3bbe5d1f74aeefce7d82802ecbb50b1d8ab7..cc7c55fc03776e331d5bf270421d3b205e79517b 100644 (file)
@@ -679,3 +679,15 @@ msgstr "Brak dostępnych danych w tabeli"
 
 msgid "Search:"
 msgstr "Szukaj:"
+
+msgid "Get pre-defined paths:"
+msgstr "Użyj pre-definiowanych lokalizacji:"
+
+msgid "Select paths"
+msgstr "Wybierz lokalizacje"
+
+msgid "Binaries:"
+msgstr "Pliki bin.:"
+
+msgid "Configs:"
+msgstr "Pliki konfig.:"
index 65086cdd612c1a13f7fde83bdce2ac767d78274b..18b69420a3efd58b033fc638d4c812f9014e9024 100644 (file)
Binary files a/gui/baculum/protected/API/Lang/pt/messages.mo and b/gui/baculum/protected/API/Lang/pt/messages.mo differ
index 597e83f771c25abda0a18a8ee54480f51c17bed3..9cf0157c5a27faaae11a8939f835a790ddb73ad7 100644 (file)
@@ -680,3 +680,14 @@ msgstr "Não há dados disponíveis na tabela"
 msgid "Search:"
 msgstr "Procurar:"
 
+msgid "Get pre-defined paths:"
+msgstr "Get pre-defined paths:"
+
+msgid "Select paths"
+msgstr "Select paths"
+
+msgid "Binaries:"
+msgstr "Binaries:"
+
+msgid "Configs:"
+msgstr "Configs:"
index ba54a47eba3a288f840b9bd1870493f9b44c0cad..35791f23922e689102cdd89db2d75d2c49a421e9 100644 (file)
Binary files a/gui/baculum/protected/API/Lang/ru/messages.mo and b/gui/baculum/protected/API/Lang/ru/messages.mo differ
index c7dd8e58eb4b8a6e58db01d5a9a0e91707678b0f..c3861bf55a00916916ddf245008e5f68e0a8461c 100644 (file)
@@ -680,3 +680,14 @@ msgstr "Нет данных в таблице"
 msgid "Search:"
 msgstr "Поиск:"
 
+msgid "Get pre-defined paths:"
+msgstr "Get pre-defined paths:"
+
+msgid "Select paths"
+msgstr "Select paths"
+
+msgid "Binaries:"
+msgstr "Binaries:"
+
+msgid "Configs:"
+msgstr "Configs:"
index 42968affaeebb8c05be6185c5f4fe91bf744ca5a..8f140a782cecacadffd5386e8457c3170d69d503 100644 (file)
                                /> <com:TLabel ForControl="ConfigYes" Text="<%[ Yes ]%>" />
                        </div>
                        <div id="configure_config" style="display: <%=($this->ConfigYes->Checked === true) ? 'block' : 'none';%>">
+                               <div class="w3-right-align">
+                                       <span><%[ Get pre-defined paths: ]%></span>
+                                       <select id="pre_defined_paths" onchange="oConfigWizardStep4.set_paths();" class="w3-input w3-border" style="width: 400px; display: inline;">
+                                               <option value=""><%[ Select paths ]%></option>
+                                               <option value="system"><%[ Binaries: ]%> /usr/sbin, <%[ Configs: ]%> /etc/bacula</option>
+                                               <option value="bacula.org"><%[ Binaries: ]%> /opt/bacula/bin, <%[ Configs: ]%> /opt/bacula/etc</option>
+                                       </select>
+                               </div>
                                <fieldset>
                                        <legend><%[ General configuration ]%></legend>
                                        <div class="w3-row w3-section" title="<%[ In this directory Baculum API saves temporarily Bacula configuration files (mainly for validation purposes) just before they are written as real Bacula configuration files. ]%>">
                                        </com:TActiveLinkButton>
                                </div>
                        </div>
+<script>
+var oConfigWizardStep4 = {
+       paths: {
+               'system': {
+                       configs: '/etc/bacula/',
+                       binaries: '/usr/sbin/'
+               },
+               'bacula.org': {
+                       configs: '/opt/bacula/etc/',
+                       binaries: '/opt/bacula/bin/'
+               }
+       },
+       ids: {
+               pre_defined_paths: 'pre_defined_paths',
+               jsontools: {
+                       bdirjson: {
+                               binary: '<%=$this->BDirJSONPath->ClientID%>',
+                               config: '<%=$this->DirCfgPath->ClientID%>'
+                       },
+                       bsdjson: {
+                               binary: '<%=$this->BSdJSONPath->ClientID%>',
+                               config: '<%=$this->SdCfgPath->ClientID%>'
+                       },
+                       bfdjson: {
+                               binary: '<%=$this->BFdJSONPath->ClientID%>',
+                               config: '<%=$this->FdCfgPath->ClientID%>'
+                       },
+                       bbconsjson: {
+                               binary: '<%=$this->BBconsJSONPath->ClientID%>',
+                               config: '<%=$this->BconsCfgPath->ClientID%>'
+                       }
+               }
+       },
+       configs: {
+               bdirjson: {
+                       config: 'bacula-dir.conf'
+               },
+               bsdjson: {
+                       config: 'bacula-sd.conf'
+               },
+               bfdjson: {
+                       config: 'bacula-fd.conf'
+               },
+               bbconsjson: {
+                       config: 'bconsole.conf'
+               }
+       },
+       set_paths: function() {
+               var paths = document.getElementById(this.ids.pre_defined_paths);
+               if (paths.value) {
+                       var bin, conf;
+                       for (var binary in this.ids.jsontools) {
+                               bin = document.getElementById(this.ids.jsontools[binary].binary);
+                               conf = document.getElementById(this.ids.jsontools[binary].config);
+                               bin.value = this.paths[paths.value].binaries + binary;
+                               conf.value = this.paths[paths.value].configs + this.configs[binary].config;
+                       }
+               }
+       }
+};
+</script>
                </com:TWizardStep>
                <com:TWizardStep ID="Step5" Title="<%[ Step 5 - authentication to API ]%>" StepType="Auto">
                        <div class="w3-container w3-section">