e044a7ad35e13ba9e9d5c7703913865e2391f2d0
[kivitendo-erp.git] / templates / webpages / background_job_history / list.html
1 [% USE HTML %][% USE L %][% USE LxERP %]
2
3  <h1>[% FORM.title %]</h1>
4
5 [%- INCLUDE 'common/flash.html' %]
6
7  <form method="post" action="controller.pl">
8   [% IF !ENTRIES.size %]
9    <p>
10     [%- LxERP.t8('There are no entries in the background job history.') %]
11    </p>
12
13   [%- ELSE %]
14    <table id="background_job_history_list" class="background_job_list" width="100%">
15     <thead>
16      <tr class="listheading">
17       <th>[% L.sortable_table_header('package_name') %]</th>
18       <th>[% L.sortable_table_header('run_at') %]</th>
19       <th>[% L.sortable_table_header('status') %]</th>
20       <th>[% L.sortable_table_header('result') %]</th>
21       <th>[% L.sortable_table_header('error') %]</th>
22      </tr>
23     </thead>
24
25     <tbody>
26     [%- FOREACH entry = ENTRIES %]
27     <tr class="listrow[% loop.count % 2 %]" id="background_job_history_id_[% entry.id %]">
28      <td>
29       <a href="[% SELF.url_for(action => 'show', id => entry.id, back_to => SELF.get_callback) %]">
30        [%- HTML.escape(entry.package_name) %]
31       </a>
32      </td>
33      <td>[%- HTML.escape(entry.run_at.to_lxoffice('precision' => 'second')) %]</td>
34      <td>
35       [%- IF entry.status == 'success' %]
36        [%- LxERP.t8('succeeded') %]
37       [%- ELSIF entry.status == 'failure' %]
38        [%- LxERP.t8('failed') %]
39       [%- ELSE %]
40        [%- HTML.escape(entry.status) %]
41       [%- END %]
42      </td>
43      <td>[%- HTML.escape(entry.result) %]</td>
44      <td>[% IF entry.error_col %]<pre>[%- HTML.escape(L.truncate(entry.error_col)) %]</pre>[%- END %]</td>
45     </tr>
46     [%- END %]
47     </tbody>
48    </table>
49   [%- END %]
50
51   [% L.paginate_controls %]
52
53   <hr size="3" noshade>
54
55   <p>
56    <a href="[% SELF.url_for(controller => 'BackgroundJob', action => 'list') %]">[%- LxERP.t8('View background jobs') %]</a>
57    |
58    <a href="[% SELF.url_for(controller => 'TaskServer', action => 'show') %]">[%- LxERP.t8('Task server control') %]</a>
59   </p>
60  </form>