From: Marcin Haba Date: Wed, 10 Jan 2018 18:32:51 +0000 (+0100) Subject: baculum: Add link to go back from job configuration window X-Git-Tag: Release-9.0.7~10 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=95af7705006efc68387f93ca30c8cc0eacb9cbd3;p=bacula%2Fbacula baculum: Add link to go back from job configuration window --- diff --git a/gui/baculum/protected/Web/Lang/en/messages.mo b/gui/baculum/protected/Web/Lang/en/messages.mo index f168c481b8..5c72e01649 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 449e4784fb..5c6781adf3 100644 --- a/gui/baculum/protected/Web/Lang/en/messages.po +++ b/gui/baculum/protected/Web/Lang/en/messages.po @@ -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" diff --git a/gui/baculum/protected/Web/Lang/ja/messages.mo b/gui/baculum/protected/Web/Lang/ja/messages.mo index 83ed0465d9..efab2ac356 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 839ff03d9e..eae8f95eef 100644 --- a/gui/baculum/protected/Web/Lang/ja/messages.po +++ b/gui/baculum/protected/Web/Lang/ja/messages.po @@ -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" diff --git a/gui/baculum/protected/Web/Lang/pl/messages.mo b/gui/baculum/protected/Web/Lang/pl/messages.mo index 63a02472f7..a7b995ea32 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 4dbdc288dc..58b8d25924 100644 --- a/gui/baculum/protected/Web/Lang/pl/messages.po +++ b/gui/baculum/protected/Web/Lang/pl/messages.po @@ -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" diff --git a/gui/baculum/protected/Web/Lang/pt/messages.mo b/gui/baculum/protected/Web/Lang/pt/messages.mo index 3e65654220..bb236c09d2 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 842c7253ba..dab8295b00 100644 --- a/gui/baculum/protected/Web/Lang/pt/messages.po +++ b/gui/baculum/protected/Web/Lang/pt/messages.po @@ -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" diff --git a/gui/baculum/protected/Web/Portlets/ClientConfiguration.php b/gui/baculum/protected/Web/Portlets/ClientConfiguration.php index 4643b825ac..bcd02b23e9 100644 --- a/gui/baculum/protected/Web/Portlets/ClientConfiguration.php +++ b/gui/baculum/protected/Web/Portlets/ClientConfiguration.php @@ -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); } } ?> diff --git a/gui/baculum/protected/Web/Portlets/JobConfiguration.php b/gui/baculum/protected/Web/Portlets/JobConfiguration.php index a3e3155418..2b3ade44ba 100644 --- a/gui/baculum/protected/Web/Portlets/JobConfiguration.php +++ b/gui/baculum/protected/Web/Portlets/JobConfiguration.php @@ -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; diff --git a/gui/baculum/protected/Web/Portlets/JobConfiguration.tpl b/gui/baculum/protected/Web/Portlets/JobConfiguration.tpl index 521e7207cf..10ffc17a3b 100644 --- a/gui/baculum/protected/Web/Portlets/JobConfiguration.tpl +++ b/gui/baculum/protected/Web/Portlets/JobConfiguration.tpl @@ -2,6 +2,16 @@

<%[ Job: ]%> [ ]

+ + + <%[ Actions ]%> <%[ Console status ]%>
diff --git a/gui/baculum/protected/Web/Portlets/VolumeConfiguration.php b/gui/baculum/protected/Web/Portlets/VolumeConfiguration.php index 7549e96aab..a5ae48d3b1 100644 --- a/gui/baculum/protected/Web/Portlets/VolumeConfiguration.php +++ b/gui/baculum/protected/Web/Portlets/VolumeConfiguration.php @@ -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) {