]> git.sur5r.net Git - bacula/bacula/commitdiff
baculum: Add link to go back from job configuration window
authorMarcin Haba <marcin.haba@bacula.pl>
Wed, 10 Jan 2018 18:32:51 +0000 (19:32 +0100)
committerMarcin Haba <marcin.haba@bacula.pl>
Wed, 10 Jan 2018 18:32:51 +0000 (19:32 +0100)
12 files changed:
gui/baculum/protected/Web/Lang/en/messages.mo
gui/baculum/protected/Web/Lang/en/messages.po
gui/baculum/protected/Web/Lang/ja/messages.mo
gui/baculum/protected/Web/Lang/ja/messages.po
gui/baculum/protected/Web/Lang/pl/messages.mo
gui/baculum/protected/Web/Lang/pl/messages.po
gui/baculum/protected/Web/Lang/pt/messages.mo
gui/baculum/protected/Web/Lang/pt/messages.po
gui/baculum/protected/Web/Portlets/ClientConfiguration.php
gui/baculum/protected/Web/Portlets/JobConfiguration.php
gui/baculum/protected/Web/Portlets/JobConfiguration.tpl
gui/baculum/protected/Web/Portlets/VolumeConfiguration.php

index f168c481b8d5cfc7988254b852f79e34cda55259..5c72e01649ac3fdc12e0faadddce51724e7146fa 100644 (file)
Binary files a/gui/baculum/protected/Web/Lang/en/messages.mo and b/gui/baculum/protected/Web/Lang/en/messages.mo differ
index 449e4784fbeeba0bf4a8cd898b3de8d89c0b8a96..5c6781adf30acb680cbc39d541b893eecce2a839 100644 (file)
@@ -1504,3 +1504,6 @@ msgstr "During restore there will be used following volumes:"
 
 msgid "Use Ctrl + Mouse Click to change selection"
 msgstr "Use Ctrl + Mouse Click to change selection"
+
+msgid "Go back"
+msgstr "Go back"
index 83ed0465d90da5c0fbd0f6e9a7ae66d6a612e3d6..efab2ac35691b974795d99e9a7d26978c5426750 100644 (file)
Binary files a/gui/baculum/protected/Web/Lang/ja/messages.mo and b/gui/baculum/protected/Web/Lang/ja/messages.mo differ
index 839ff03d9ebb9845e376ac28208f820412b86be9..eae8f95eef43d4bc35a26b615300b5c8c9912640 100644 (file)
@@ -1255,3 +1255,6 @@ msgstr "During restore there will be used following volumes:"
 
 msgid "Use Ctrl + Mouse Click to change selection"
 msgstr "Use Ctrl + Mouse Click to change selection"
+
+msgid "Go back"
+msgstr "Go back"
index 63a02472f79b5a98d37ff4fffa205ec92c638103..a7b995ea32691b83ab50944cc8e3395f65b7d198 100644 (file)
Binary files a/gui/baculum/protected/Web/Lang/pl/messages.mo and b/gui/baculum/protected/Web/Lang/pl/messages.mo differ
index 4dbdc288dc3bb94af9d5d3ca1ae9d96a0ec952fb..58b8d25924d7ef239843c1d2c5e8a116ed7a8d7b 100644 (file)
@@ -1511,3 +1511,6 @@ msgstr "Podczas zadania przywracania danych potrzebne będą następujące wolum
 
 msgid "Use Ctrl + Mouse Click to change selection"
 msgstr "Aby zmienić wybór, użyj Ctrl + klik myszy"
+
+msgid "Go back"
+msgstr "Powrót"
index 3e6565422009c0a4096b96c3a9eddce0e5adcf61..bb236c09d2e2ca216e10bc28b32f8187fdbca4e0 100644 (file)
Binary files a/gui/baculum/protected/Web/Lang/pt/messages.mo and b/gui/baculum/protected/Web/Lang/pt/messages.mo differ
index 842c7253ba05a13fbda66b308ef4b3f059552d77..dab8295b0024d925d4f1d2b7db2ff9da0f66b1bc 100644 (file)
@@ -1519,3 +1519,6 @@ msgstr "During restore there will be used following volumes:"
 
 msgid "Use Ctrl + Mouse Click to change selection"
 msgstr "Use Ctrl + Mouse Click to change selection"
+
+msgid "Go back"
+msgstr "Go back"
index 4643b825ac25cffc0770fc0228ea52c476048a54..bcd02b23e9ece1f8fcf82011d81c385f6d6ab1ce 100644 (file)
@@ -26,11 +26,6 @@ Prado::using('Application.Web.Portlets.Portlets');
 
 class ClientConfiguration extends Portlets {
 
-       public function onInit($param) {
-               parent::onInit($param);
-               $this->Status->setActionClass($this);
-       }
-
        public function configure($clientId) {
                $clientdata = $this->Application->getModule('api')->get(array('clients', 'show', $clientId))->output;
                $this->ShowClient->Text = implode(PHP_EOL, $clientdata);
@@ -51,7 +46,10 @@ class ClientConfiguration extends Portlets {
 
        public function openJob($sender, $param) {
                $jobid = $param->CallbackParameter;
-               $this->getPage()->JobConfiguration->configure($jobid);
+               $params = array(
+                       'prev_window' => 'ClientWindow'
+               );
+               $this->getPage()->JobConfiguration->configure($jobid, $params);
        }
 }
 ?>
index a3e31554189ac9cc0444288fea1aefa0404c9c96..2b3ade44baee57dfb1948e5c7f4310d91cadf32a 100644 (file)
@@ -37,13 +37,13 @@ class JobConfiguration extends Portlets {
 
        public $verifyOptions = array('jobname' => 'Verify by Job Name', 'jobid' => 'Verify by JobId');
 
-       public function configure($jobId, $params = array()) {
-               $jobdata = $this->Application->getModule('api')->get(array('jobs', $jobId))->output;
+       public function configure($jobid, $params = array()) {
+               $jobdata = $this->Application->getModule('api')->get(array('jobs', $jobid))->output;
                $this->JobName->Text = $jobdata->job;
                $this->JobID->Text = $jobdata->jobid;
                $joblog = $this->Application->getModule('api')->get(array('joblog', $jobdata->jobid))->output;
-               $runningJobStates = $this->Application->getModule('misc')->getRunningJobStates();
-               if (in_array($jobdata->jobstatus, $runningJobStates)) {
+               $running_job_states = $this->Application->getModule('misc')->getRunningJobStates();
+               if (in_array($jobdata->jobstatus, $running_job_states)) {
                        $this->Estimation->CssClass = 'textbox-auto wheel-loader';
                } else {
                        $this->Estimation->CssClass = 'textbox-auto';
@@ -127,8 +127,7 @@ class JobConfiguration extends Portlets {
                }
                $this->Storage->dataBind();
 
-               $runningJobStates = $this->Application->getModule('misc')->getRunningJobStates();
-               $isJobRunning = in_array($jobdata->jobstatus, $runningJobStates);
+               $isJobRunning = in_array($jobdata->jobstatus, $running_job_states);
 
                $this->Priority->Text = ($jobdata->priorjobid == 0) ? self::DEFAULT_JOB_PRIORITY : $jobdata->priorjobid;
                $this->DeleteButton->Visible = true;
@@ -137,12 +136,19 @@ class JobConfiguration extends Portlets {
                $this->Run->Display = 'Dynamic';
                $this->EstimateLine->Display = 'Dynamic';
                $this->Status->Visible = true;
+               if (key_exists('prev_window', $params)) {
+                       $this->GoBack->Value = $params['prev_window'];
+                       $this->getPage()->getCallbackClient()->show('job_go_back');
+               } else {
+
+                       $this->getPage()->getCallbackClient()->hide('job_go_back');
+               }
        }
 
        public function status($sender, $param) {
                $jobdata = $this->Application->getModule('api')->get(array('jobs', $this->JobID->Text))->output;
-               $runningJobStates = $this->Application->getModule('misc')->getRunningJobStates();
-               if (in_array($jobdata->jobstatus, $runningJobStates)) {
+               $running_job_states = $this->Application->getModule('misc')->getRunningJobStates();
+               if (in_array($jobdata->jobstatus, $running_job_states)) {
                        $this->RefreshStart->Value = true;
                } else {
                        $this->RefreshStart->Value = false;
index 521e7207cfc847a15894e3ffc280646860276022..10ffc17a3bf84a61f0b57ce39458578bd449b972 100644 (file)
@@ -2,6 +2,16 @@
 <com:TContent ID="ConfigurationWindowContent">
        <com:TActivePanel DefaultButton="Run">
                <h4><%[ Job: ]%> [ <com:TActiveLabel ID="JobID" /> ] <com:TActiveLabel ID="JobName" Style="word-break: break-all;" /></h4>
+               <com:TActiveHiddenField ID="GoBack" />
+               <script type="text/javascript">
+                       var job_go_back = function() {
+                               var prev_window = document.getElementById('<%=$this->GoBack->ClientID%>').value;
+                               if (prev_window) {
+                                       ConfigurationWindow.getObj(prev_window).show();
+                               }
+                       };
+               </script>
+               <a id="job_go_back" href="javascript:void(0)" onclick="job_go_back()" style="display: none"><strong>&laquo; <%[ Go back ]%></strong></a>
                <span class="text tab tab_active" rel="job_actions_tab"><%[ Actions ]%></span>
                <span class="text tab" rel="job_console_tab"><%[ Console status ]%></span>
                <hr class="tabs" />
index 7549e96aab0439d79e997614b5b8f3bca713a3e9..a5ae48d3b1eb11d181ca2be2c69654cbb7599323 100644 (file)
@@ -103,7 +103,10 @@ class VolumeConfiguration extends Portlets {
 
        public function openJob($sender, $param) {
                $jobid = $param->CallbackParameter;
-               $this->getPage()->JobConfiguration->configure($jobid);
+               $params = array(
+                       'prev_window' => 'VolumeWindow'
+               );
+               $this->getPage()->JobConfiguration->configure($jobid, $params);
        }
 
        public function getVolumeStates($forSetOnly = false) {