]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
baculum: Add list job files to job history view page
authorMarcin Haba <marcin.haba@bacula.pl>
Mon, 28 Oct 2019 19:38:36 +0000 (20:38 +0100)
committerMarcin Haba <marcin.haba@bacula.pl>
Sat, 14 Dec 2019 14:57:31 +0000 (15:57 +0100)
14 files changed:
gui/baculum/protected/Web/JavaScript/misc.js
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/Pages/JobHistoryView.page
gui/baculum/protected/Web/Pages/JobHistoryView.php
gui/baculum/protected/Web/Portlets/JobListFiles.php [new file with mode: 0644]
gui/baculum/protected/Web/Portlets/JobListFiles.tpl [new file with mode: 0644]
gui/baculum/protected/Web/Portlets/RunJob.php

index 0128f5379dd5d176926ad92a69957fea80d129c8..8bf2a8fcb3078c5f4750a2065df9f0c45c0df424 100644 (file)
@@ -815,7 +815,7 @@ W3TabsCommon = {
                for (var i = 0; i < tab_btns.length; i++) {
                        if (tab_btns[i].id === btn_id && !tab_btns[i].classList.contains(this.css.tab_item_hover)) {
                                tab_btns[i].classList.add(this.css.tab_item_hover);
-                       } else if (tab_btns[i].classList.contains(this.css.tab_item_hover)) {
+                       } else if (tab_btns[i].id !== btn_id && tab_btns[i].classList.contains(this.css.tab_item_hover)) {
                                tab_btns[i].classList.remove(this.css.tab_item_hover);
                        }
                }
index 627403baa2da5a27cf239c5cc1d0277bf02b634e..78c10d413792b00ef608e07e403302a047cfabf6 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 250f444d0c8e760ce72826d09d3011cd3a585fbe..ceb0b154fcd72427563aecfb6010b27790575a2a 100644 (file)
@@ -2365,3 +2365,30 @@ msgstr "The storage has been selected basing on job configuration. This item may
 
 msgid "Graphical job status is supported for jobs running on Bacula clients version 9.0 and greater."
 msgstr "Graphical job status is supported for jobs running on Bacula clients version 9.0 and greater."
+
+msgid "Offset:"
+msgstr "Offset:"
+
+msgid "List type:"
+msgstr "List type:"
+
+msgid "saved items"
+msgstr "saved items"
+
+msgid "deleted items"
+msgstr "deleted items"
+
+msgid "all"
+msgstr "all"
+
+msgid "Find file or directory"
+msgstr "Find file or directory"
+
+msgid "Find"
+msgstr "Find"
+
+msgid "Item count:"
+msgstr "Item count:"
+
+msgid "No item result"
+msgstr "No item result"
index ac4e69acbd45ecc7fe68665d5f508cf2ff7fe270..b94432bc4cee0c23c4dd2d891f42f10f8fe96744 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 d47005d040526516daee86b6916a81afa50aa9b8..a802e4781f26ae252de20444bd3d2904fe987ca4 100644 (file)
@@ -2451,3 +2451,30 @@ msgstr "The storage has been selected basing on job configuration. This item may
 
 msgid "Graphical job status is supported for jobs running on Bacula clients version 9.0 and greater."
 msgstr "Graphical job status is supported for jobs running on Bacula clients version 9.0 and greater."
+
+msgid "Offset:"
+msgstr "Offset:"
+
+msgid "List type:"
+msgstr "List type:"
+
+msgid "saved items"
+msgstr "saved items"
+
+msgid "deleted items"
+msgstr "deleted items"
+
+msgid "all"
+msgstr "all"
+
+msgid "Find file or directory"
+msgstr "Find file or directory"
+
+msgid "Find"
+msgstr "Find"
+
+msgid "Item count:"
+msgstr "Item count:"
+
+msgid "No item result"
+msgstr "No item result"
index 77c3bd9df64afa7fd062d102bf61e4689a4af6bb..6b5ab56b0eed53c81c950c5c59abdb261532184f 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 e7cf7572dece034981a6f2acab00805e303a2db8..7607cd8e31552704da923ce731dbe4edff63315e 100644 (file)
@@ -2372,3 +2372,30 @@ msgstr "Wartość magazynu danych została wybrana, bazując na konfiguracji zad
 
 msgid "Graphical job status is supported for jobs running on Bacula clients version 9.0 and greater."
 msgstr "Graficzny status zadania jest wspierany dla zadań uruchomionych na klientach Bacula w wersji 9.0 lub wyższych."
+
+msgid "Offset:"
+msgstr "Offset:"
+
+msgid "List type:"
+msgstr "Typ listy:"
+
+msgid "saved items"
+msgstr "zapisane elementy"
+
+msgid "deleted items"
+msgstr "skasowane elementy"
+
+msgid "all"
+msgstr "wszystko"
+
+msgid "Find file or directory"
+msgstr "Znajdź plik lub katalog"
+
+msgid "Find"
+msgstr "Znajdź"
+
+msgid "Item count:"
+msgstr "Ilość elementów:"
+
+msgid "No item result"
+msgstr "Brak wyniku"
index 65f512a205a65fc1f51733ddc9103294136852e6..72cc9295879d454491f0925298db7997ca58e62c 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 38c5127eac36730a6f418e9449d433503a6fa522..2923475bbd36584a10a3354a1f8bbf8341731cad 100644 (file)
@@ -2380,3 +2380,30 @@ msgstr "The storage has been selected basing on job configuration. This item may
 
 msgid "Graphical job status is supported for jobs running on Bacula clients version 9.0 and greater."
 msgstr "Graphical job status is supported for jobs running on Bacula clients version 9.0 and greater."
+
+msgid "Offset:"
+msgstr "Offset:"
+
+msgid "List type:"
+msgstr "List type:"
+
+msgid "saved items"
+msgstr "saved items"
+
+msgid "deleted items"
+msgstr "deleted items"
+
+msgid "all"
+msgstr "all"
+
+msgid "Find file or directory"
+msgstr "Find file or directory"
+
+msgid "Find"
+msgstr "Find"
+
+msgid "Item count:"
+msgstr "Item count:"
+
+msgid "No item result"
+msgstr "No item result"
index 61bb4d697c9ffc907ef1fd1a5098a8dda6ae0ac9..386b9983a625142a4927641e76f4f787bc24e56d 100644 (file)
                                OnCallback="runningJobStatus"
                                ClientSide.OnComplete="oRunningJobStatus.init_refresh();"
                        />
-                       <com:TConditional
-                               ID="RunningJobStatus"
-                               Condition="$this->allow_graph_mode"
-                       >
-                               <prop:TrueTemplate>
                        <div class="w3-row">
-                               <a href="javascript:void(0)" onclick="W3SubTabs.open('status_running_job_subtab_graphical', 'status_running_job_graphical_output');">
+                               <a href="javascript:void(0)" onclick="W3SubTabs.open('status_running_job_subtab_graphical', 'status_running_job_graphical_output');"<%=!$this->allow_graph_mode ? ' style="display: none"' : ''%>>
                                        <div id="status_running_job_subtab_graphical" class="subtab_btn w3-half w3-bottombar w3-hover-light-grey w3-border-red w3-padding"><%[ Running job status ]%></div>
-                                </a>
+                               </a>
                                <a href="javascript:void(0)" onclick="W3SubTabs.open('joblog_subtab_text', 'joblog_text_output');">
                                        <div id="joblog_subtab_text" class="subtab_btn w3-half w3-bottombar w3-hover-light-grey w3-padding"><%[ Raw job log ]%></div>
                                </a>
+                               <a href="javascript:void(0)" onclick="W3SubTabs.open('jobfiles_subtab_text', 'jobfiles_list'); load_job_list_files();"<%=!$this->allow_list_files_mode ? ' style="display: none"' : ''%>>
+                                       <div id="jobfiles_subtab_text" class="subtab_btn w3-half w3-bottombar w3-hover-light-grey w3-padding"><%[ Job files ]%></div>
+                               </a>
                        </div>
-                       <div id="status_running_job_graphical_output" class="subtab_item">
+                       <div id="status_running_job_graphical_output" class="subtab_item" style="display: none">
                                <h4 id="status_running_job_status_not_supported" style="display: none"><%[ Graphical job status is supported for jobs running on Bacula clients version 9.0 and greater. ]%></h4>
                                <div id="status_running_job_graphical_container">
                                        <div class="w3-right w3-margin-top w3-margin-right" title="<%[ To disable refreshing please type 0. ]%>">
@@ -201,7 +199,9 @@ var oRunningJobStatus = {
                        $('#' + this.ids.refresh_interval).parent().hide();
                        var graphical_container = document.getElementById(this.ids.graphical_container);
                        graphical_container.style.display = 'none';
-                       W3SubTabs.open('joblog_subtab_text', 'joblog_text_output');
+                       if (document.getElementById('jobfiles_list').style.display == 'none') {
+                               W3SubTabs.open('joblog_subtab_text', 'joblog_text_output');
+                       }
                }
        },
        add_running_job: function(job, full_refresh) {
@@ -376,8 +376,15 @@ var oRunningJobStatus = {
        }
 }
 
-function init_graphical_running_job_status(data) {
+function init_graphical_running_job_status(data, tab_data) {
        oRunningJobStatus.update(data);
+       var tabs = Object.keys(tab_data);
+       for (var i = 0; i < tabs.length; i++) {
+               document.getElementById(tabs[i]).parentNode.style.display = (tab_data[tabs[i]] ? '' : 'none');
+       }
+       if (document.getElementById('status_running_job_subtab_graphical').classList.contains(W3SubTabs.css.tab_item_hover)) {
+               W3SubTabs.open('status_running_job_subtab_graphical', 'status_running_job_graphical_output');
+       }
 }
 
 oRunningJobStatus.init();
@@ -388,15 +395,36 @@ $(function() {
 });
                                </script>
                        </div>
-                       <div id="joblog_text_output" class="subtab_item" style="display: none">
-                               </prop:TrueTemplate>
+                       <com:TConditional
+                               Condition="$this->allow_graph_mode"
+                       >
+                               <prop:FalseTemplate>
+                                       <script>
+                                               $(function() {
+                                                       W3SubTabs.open('joblog_subtab_text', 'joblog_text_output');
+                                               });
+                                       </script>
+                               </prop:FalseTemplate>
                        </com:TConditional>
+                       <div id="joblog_text_output" class="subtab_item" style="display: none">
                                <div class="w3-code">
                                        <pre><com:TActiveLabel ID="JobLog" /></pre>
                                </div>
-                       <com:TConditional Condition="$this->allow_graph_mode">
-                               <prop:TrueTemplate>
                        </div>
+                       <div id="jobfiles_list" class="subtab_item" style="display: none">
+                               <com:Application.Web.Portlets.JobListFiles
+                                       ID="FileList"
+                               />
+                       </div>
+                       <com:TConditional
+                               Condition="$this->allow_list_files_mode"
+                       >
+                               <prop:TrueTemplate>
+                                       <script>
+                                               $(function() {
+                                                       W3SubTabs.open('joblog_subtab_text', 'joblog_text_output');
+                                               });
+                                       </script>
                                </prop:TrueTemplate>
                        </com:TConditional>
                </div>
index 108346d5bd9d8150a75bfeae114a8d91837e3159..36eeab92da1f9222a207653936f7e67f4e4e1447 100644 (file)
@@ -3,7 +3,7 @@
  * Bacula(R) - The Network Backup Solution
  * Baculum   - Bacula web interface
  *
- * Copyright (C) 2013-2018 Kern Sibbald
+ * Copyright (C) 2013-2019 Kern Sibbald
  *
  * The main author of Baculum is Marcin Haba.
  * The original author of Bacula is Kern Sibbald, with contributions
@@ -32,8 +32,9 @@ class JobHistoryView extends BaculumWebPage {
        const JOBID = 'JobId';
        const JOB_NAME = 'JobName';
        const JOB_UNAME = 'JobUname';
-       const CLIENTID = 'ClientId';
+       const JOB_LEVEL = 'JobLevel';
        const JOB_TYPE = 'JobType';
+       const CLIENTID = 'ClientId';
 
        const USE_CACHE = true;
 
@@ -44,7 +45,11 @@ class JobHistoryView extends BaculumWebPage {
 
        public $is_running = false;
        public $allow_graph_mode = false;
+       public $allow_list_files_mode = false;
        private $no_graph_mode_types = array('M', 'D', 'C', 'c', 'g');
+       private $no_graph_mode_verify_levels = array('O');
+       private $list_files_types = array('B', 'C', 'V');
+       private $list_files_mode_verify_levels = array('V');
 
        public function onPreInit($param) {
                parent::onPreInit($param);
@@ -60,15 +65,27 @@ class JobHistoryView extends BaculumWebPage {
                $this->setJobName($jobdata->name);
                $this->setJobUname($jobdata->job);
                $this->setJobType($jobdata->type);
+               $this->setJobLevel($jobdata->level);
                $this->setClientId($jobdata->clientid);
                $this->is_running = $this->getModule('misc')->isJobRunning($jobdata->jobstatus);
                $this->allow_graph_mode = ($this->is_running && !in_array($jobdata->type, $this->no_graph_mode_types));
+               $this->allow_list_files_mode = (!$this->is_running && in_array($jobdata->type, $this->list_files_types));
+               if ($jobdata->type === 'V') {
+                       // Verify job requires special treating here
+                       if (in_array($jobdata->level, $this->no_graph_mode_verify_levels)) {
+                               $this->allow_graph_mode = false;
+                       }
+                       if (!in_array($jobdata->level, $this->list_files_mode_verify_levels)) {
+                               $this->allow_list_files_mode = false;
+                       }
+               }
        }
 
        public function onInit($param) {
                parent::onInit($param);
                $this->RunJobModal->setJobId($this->getJobId());
                $this->RunJobModal->setJobName($this->getJobName());
+               $this->FileList->setJobId($this->getJobId());
        }
 
        public function onLoad($param) {
@@ -81,7 +98,17 @@ class JobHistoryView extends BaculumWebPage {
 
        public function runningJobStatus($sender, $param) {
                $running_job_status = $this->getRunningJobStatus($this->getClientId());
-               $this->getCallbackClient()->callClientFunction('init_graphical_running_job_status', array($running_job_status));
+               $tabs = array(
+                       'joblog_subtab_text' => true,
+                       'status_running_job_subtab_graphical' => false,
+                       'jobfiles_subtab_text' => false
+               );
+               if ($this->allow_graph_mode) {
+                       $tabs['status_running_job_subtab_graphical'] = true;
+               } elseif ($this->allow_list_files_mode) {
+                       $tabs['jobfiles_subtab_text'] = true;
+               }
+               $this->getCallbackClient()->callClientFunction('init_graphical_running_job_status', array($running_job_status, $tabs));
        }
 
        public function getRunningJobStatus($clientid) {
@@ -220,6 +247,24 @@ class JobHistoryView extends BaculumWebPage {
                return $this->getViewState(self::JOB_TYPE);
        }
 
+       /**
+        * Set job level.
+        *
+        * @return none;
+        */
+       public function setJobLevel($job_level) {
+               $this->setViewState(self::JOB_LEVEL, $job_level);
+       }
+
+       /**
+        * Get job level.
+        *
+        * @return string job level
+        */
+       public function getJobLevel() {
+               return $this->getViewState(self::JOB_LEVEL);
+       }
+
        /**
         * Refresh job log page and load latest logs.
         *
diff --git a/gui/baculum/protected/Web/Portlets/JobListFiles.php b/gui/baculum/protected/Web/Portlets/JobListFiles.php
new file mode 100644 (file)
index 0000000..32a15b1
--- /dev/null
@@ -0,0 +1,109 @@
+<?php
+/*
+ * Bacula(R) - The Network Backup Solution
+ * Baculum   - Bacula web interface
+ *
+ * Copyright (C) 2013-2019 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.TActiveLabel');
+Prado::using('System.Web.UI.ActiveControls.TActiveTextBox');
+Prado::using('System.Web.UI.ActiveControls.TActiveDropDownList');
+Prado::using('System.Web.UI.ActiveControls.TActiveRepeater');
+Prado::using('System.Web.UI.ActiveControls.TCallback');
+Prado::using('System.Web.UI.WebControls.TListItem');
+Prado::using('Application.Web.Portlets.Portlets');
+
+class JobListFiles extends Portlets {
+
+       const JOBID = 'JobId';
+
+       const DEFAULT_PAGE_SIZE = 100;
+
+       public function onLoad($param) {
+               parent::onLoad($param);
+               if ($this->getPage()->IsPostBack || $this->getPage()->IsCallBack) {
+                       return;
+               }
+               $this->FileListOffset->Text = 0;
+               $this->FileListLimit->Text = self::DEFAULT_PAGE_SIZE;
+       }
+
+       public function loadFileList($sender, $param) {
+               $params = array(
+                       'offset' => intval($this->FileListOffset->Text),
+                       'limit' => intval($this->FileListLimit->Text)
+               );
+               if (!empty($this->FileListType->SelectedValue)) {
+                       $params['type'] = $this->FileListType->SelectedValue;
+               }
+               if (!empty($this->FileListSearch->Text)) {
+                       $params['search'] = $this->FileListSearch->Text;
+               }
+               $query = '?' . http_build_query($params);
+               $result = $this->getModule('api')->get(
+                       array('jobs', $this->getJobId(), 'files', $query)
+               );
+               if ($result->error === 0) {
+                       $file_list = $result->output->items;
+                       if (!empty($this->FileListSearch->Text)) {
+                               $file_list = $this->findFileListItems($file_list, $this->FileListSearch->Text);
+                       }
+                       $this->FileList->DataSource = $file_list;
+                       $this->FileList->dataBind();
+                       $this->FileListCount->Text = $result->output->total;
+               } else {
+                       $this->FileList->DataSource = array();
+                       $this->FileList->dataBind();
+                       $this->FileListCount->Text = 0;
+               }
+       }
+
+       private function findFileListItems($file_list, $keyword) {
+               $result = array();
+               for ($i = 0; $i < count($file_list); $i++) {
+                       $pos = stripos($file_list[$i], $keyword);
+                       $str1 = substr($file_list[$i], 0, $pos);
+                       $key_len = strlen($keyword);
+                       $key = substr($file_list[$i], $pos, $key_len);
+                       $str2 = substr($file_list[$i], ($pos + $key_len));
+                       $result[] = $str1 . '<strong class="w3-text-red">' . $key . '</strong>' . $str2;
+               }
+               return $result;
+       }
+
+       /**
+        * Set job identifier to show files.
+        *
+        * @return none
+        */
+       public function setJobId($jobid) {
+               $jobid = intval($jobid);
+               $this->setViewState(self::JOBID, $jobid, 0);
+       }
+
+       /**
+        * Get job identifier to show files.
+        *
+        * @return integer job identifier
+        */
+       public function getJobId() {
+               return $this->getViewState(self::JOBID, 0);
+       }
+}
+?>
diff --git a/gui/baculum/protected/Web/Portlets/JobListFiles.tpl b/gui/baculum/protected/Web/Portlets/JobListFiles.tpl
new file mode 100644 (file)
index 0000000..71d55fa
--- /dev/null
@@ -0,0 +1,80 @@
+<div class="w3-panel">
+       <button type="button" class="w3-button w3-dark-grey w3-right w3-margin-left" onclick="get_job_list_files(1);"><%[ Next ]%> &nbsp;<i class="fa fa-arrow-right"></i></button>
+       <button type="button" class="w3-button w3-dark-grey w3-right w3-margin-left" onclick="get_job_list_files(-1);"><i class="fa fa-arrow-left"></i> &nbsp;<%[ Previous ]%></button>
+       <button type="button" class="w3-button w3-dark-grey w3-right" onclick="load_job_list_files();"><i class="fa fa-check"></i> &nbsp;<%[ Apply ]%></button>
+       <div style="display: inline-block;" class="w3-right w3-margin-right">
+               <span><%[ Offset: ]%></span> <com:TActiveTextBox ID="FileListOffset" Width="70px" CssClass="w3-input w3-border" Style="display: inline-block" />
+               <span><%[ Limit: ]%></span> <com:TActiveTextBox ID="FileListLimit" Width="70px" CssClass="w3-input w3-border" Style="display: inline-block" />
+       </div>
+       <div style="display: inline-block;" class="w3-right w3-margin-right">
+               <%[ List type: ]%> <com:TActiveDropDownList ID="FileListType" CssClass="w3-select w3-border" style="width: 150px;">
+                       <com:TListItem Value="" Text="<%[ saved items ]%>" />
+                       <com:TListItem Value="deleted" Text="<%[ deleted items ]%>" />
+                       <com:TListItem Value="all" Text="<%[ all ]%>" />
+               </com:TActiveDropDownList>
+       </div>
+       <div style="display: inline-block; margin-right: 5px;" class="w3-left">
+               <%[ Search: ]%> <com:TActiveTextBox
+                       ID="FileListSearch"
+                       CssClass="w3-input w3-border"
+                       Style="width: 200px; display: inline-block;"
+                       Attributes.placeholder="<%[ Find file or directory ]%>"
+                       Attributes.onkeyup="var keycode = event.keyCode || event.which; if (keycode === 13) { find_job_list_items(); }"
+               />
+               <button type="button" class="w3-button w3-dark-grey" onclick="find_job_list_items();"><i class="fas fa-search"></i> &nbsp;<%[ Find ]%></button>
+               <button type="button" class="w3-button w3-dark-grey" onclick="clear_job_list_items();" title="<%[ Clear ]%>"><i class="fas fa-times"></i></button>
+               <span class="w3-margin-left"><%[ Item count: ]%> <com:TActiveLabel ID="FileListCount" /></span>
+               <i id="jobfiles_loading" class="fa fa-sync w3-spin w3-margin-left" style="display: none;"></i>
+       </div>
+</div>
+<div class="w3-container">
+       <div id="job_list_files_no_result" class="w3-panel w3-center" style="display: none"><strong><%[ No item result ]%></strong></div>
+       <com:TActiveRepeater ID="FileList">
+               <prop:HeaderTemplate>
+                       <ul>
+               </prop:HeaderTemplate>
+               <prop:ItemTemplate>
+                       <li><%=$this->Data%></li>
+               </prop:ItemTemplate>
+               <prop:FooterTemplate>
+                       </ul>
+               </prop:FooterTemplate>
+       </com:TActiveRepeater>
+</div>
+<com:TCallback
+       ID="LoadJobFileList"
+       OnCallback="loadFileList"
+       ClientSide.OnLoading="show_job_list_files_loader(true)"
+       ClientSide.OnComplete="job_list_files_msg(); show_job_list_files_loader(false)"
+/>
+<script>
+function get_job_list_files(page_direction) {
+       var ofs = document.getElementById('<%=$this->FileListOffset->ClientID%>');
+       var lmt = document.getElementById('<%=$this->FileListLimit->ClientID%>');
+       var ofs_val =  (parseInt(lmt.value, 10) * page_direction) + parseInt(ofs.value, 10);
+       ofs.value = (ofs_val > 0) ? ofs_val : 0;
+       load_job_list_files();
+}
+function find_job_list_items() {
+       document.getElementById('<%=$this->FileListOffset->ClientID%>').value = 0;
+       document.getElementById('<%=$this->FileListLimit->ClientID%>').value = <%=JobListFiles::DEFAULT_PAGE_SIZE%>;
+       load_job_list_files();
+}
+function clear_job_list_items() {
+       document.getElementById('<%=$this->FileListSearch->ClientID%>').value = '';
+       find_job_list_items();
+}
+function load_job_list_files() {
+       var request = <%=$this->LoadJobFileList->ActiveControl->Javascript%>;
+       request.dispatch();
+}
+function job_list_files_msg() {
+       var flc = document.getElementById('<%=$this->FileListCount->ClientID%>');
+       var item_count = parseInt(flc.textContent, 10);
+       document.getElementById('job_list_files_no_result').style.display = item_count == 0 ? '' : 'none';
+}
+function show_job_list_files_loader(show) {
+       document.getElementById('jobfiles_loading').style.display = (show ? '' : 'none');
+}
+job_list_files_msg();
+</script>
index 8c1f0ab9529ebf8bff9a28d371f97d7e3b27107d..94049eb0faf4bd4a1a062b30c9c73b485ca191e0 100644 (file)
@@ -44,7 +44,7 @@ class RunJob extends Portlets {
 
        const DEFAULT_JOB_PRIORITY = 10;
 
-       public $job_to_verify = array('C', 'O', 'd');
+       public $job_to_verify = array('C', 'O', 'd', 'A');
 
        public $verify_options = array('jobname' => 'Verify by Job Name', 'jobid' => 'Verify by JobId');