From: Marcin Haba Date: Tue, 20 Aug 2019 04:54:09 +0000 (+0200) Subject: baculum: Improve selecting storage value in run job window X-Git-Tag: Release-9.6.0~131 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=645c265ccf181590c1b47a5a6dbc0df0c4ec5c9c;p=thirdparty%2Fbacula.git baculum: Improve selecting storage value in run job window --- diff --git a/gui/baculum/protected/Web/Lang/en/messages.mo b/gui/baculum/protected/Web/Lang/en/messages.mo index 8d30002ae..1e8c639c8 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 049f87f07..b2091c1ae 100644 --- a/gui/baculum/protected/Web/Lang/en/messages.po +++ b/gui/baculum/protected/Web/Lang/en/messages.po @@ -2359,3 +2359,6 @@ msgstr "Raw job log" msgid "Not available" msgstr "Not available" + +msgid "The storage has been selected basing on job configuration. This item may require adjusting before job run." +msgstr "The storage has been selected basing on job configuration. This item may require adjusting before job run." diff --git a/gui/baculum/protected/Web/Lang/ja/messages.mo b/gui/baculum/protected/Web/Lang/ja/messages.mo index 609319933..e7b6fc958 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 09ef8e794..60bbce5a4 100644 --- a/gui/baculum/protected/Web/Lang/ja/messages.po +++ b/gui/baculum/protected/Web/Lang/ja/messages.po @@ -2445,3 +2445,6 @@ msgstr "Raw job log" msgid "Not available" msgstr "Not available" + +msgid "The storage has been selected basing on job configuration. This item may require adjusting before job run." +msgstr "The storage has been selected basing on job configuration. This item may require adjusting before job run." diff --git a/gui/baculum/protected/Web/Lang/pl/messages.mo b/gui/baculum/protected/Web/Lang/pl/messages.mo index ef64e6a17..95a5b27ee 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 aaffb3206..8269b22a3 100644 --- a/gui/baculum/protected/Web/Lang/pl/messages.po +++ b/gui/baculum/protected/Web/Lang/pl/messages.po @@ -2366,3 +2366,6 @@ msgstr "Surowy dziennik zadania" msgid "Not available" msgstr "Niedostępny" + +msgid "The storage has been selected basing on job configuration. This item may require adjusting before job run." +msgstr "Wartość magazynu danych została wybrana, bazując na konfiguracji zadania. Ta opcja może wymagać dopasowania przed uruchomieniem zadania." diff --git a/gui/baculum/protected/Web/Lang/pt/messages.mo b/gui/baculum/protected/Web/Lang/pt/messages.mo index 70994e237..6e607046b 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 4df9ba859..5fffba033 100644 --- a/gui/baculum/protected/Web/Lang/pt/messages.po +++ b/gui/baculum/protected/Web/Lang/pt/messages.po @@ -2374,3 +2374,6 @@ msgstr "Raw job log" msgid "Not available" msgstr "Not available" + +msgid "The storage has been selected basing on job configuration. This item may require adjusting before job run." +msgstr "The storage has been selected basing on job configuration. This item may require adjusting before job run." diff --git a/gui/baculum/protected/Web/Portlets/RunJob.php b/gui/baculum/protected/Web/Portlets/RunJob.php index 6a2740b87..8c1f0ab95 100644 --- a/gui/baculum/protected/Web/Portlets/RunJob.php +++ b/gui/baculum/protected/Web/Portlets/RunJob.php @@ -54,6 +54,14 @@ class RunJob extends Portlets { $jobdata = null; if ($jobid > 0) { $jobdata = $this->getModule('api')->get(array('jobs', $jobid), null, true, self::USE_CACHE)->output; + $job_show = $this->getModule('api')->get( + array('jobs', 'show', '?name='. rawurlencode($jobdata->name)), + null, + true, + self::USE_CACHE + )->output; + $jobdata->storage = $this->getResourceName('(?:storage|autochanger)', $job_show); + $this->getPage()->getCallbackClient()->show('run_job_storage_from_config_info'); } elseif (!empty($jobname)) { $jobdata = new stdClass; $job_show = $this->getModule('api')->get( @@ -72,10 +80,7 @@ class RunJob extends Portlets { $jobdata->client = $this->getResourceName('client', $job_show); $jobdata->fileset = $this->getResourceName('fileset', $job_show); $jobdata->pool = $this->getResourceName('pool', $job_show); - $jobdata->storage = $this->getResourceName('storage', $job_show); - if (empty($jobdata->storage)) { - $jobdata->storage = $this->getResourceName('autochanger', $job_show); - } + $jobdata->storage = $this->getResourceName('(?:storage|autochanger)', $job_show); $jobdata->priorjobid = $job_attr['priority']; $jobdata->accurate = (key_exists('accurate', $job_attr) && $job_attr['accurate'] == 1); } else { diff --git a/gui/baculum/protected/Web/Portlets/RunJob.tpl b/gui/baculum/protected/Web/Portlets/RunJob.tpl index 0a2ea966e..4b0c327a3 100644 --- a/gui/baculum/protected/Web/Portlets/RunJob.tpl +++ b/gui/baculum/protected/Web/Portlets/RunJob.tpl @@ -108,6 +108,9 @@
+