6 [% BLOCK show_job_status %]
7 [% SWITCH job.status %]
10 [% CASE "cancelled" %]
11 <span>Cancelled</span>
20 [% CASE # Default case %]
21 [% job.status | html %]
24 [% BLOCK show_job_type %]
26 [% CASE 'batch_biblio_record_modification' %]
27 <span>Batch bibliographic record modification</span>
28 [% CASE 'batch_biblio_record_deletion' %]
29 <span>Batch bibliographic record record deletion</span>
30 [% CASE 'batch_authority_record_modification' %]
31 <span>Batch authority record modification</span>
32 [% CASE 'batch_authority_record_deletion' %]
33 <span>Batch authority record deletion</span>
34 [% CASE 'batch_item_record_modification' %]
35 <span>Batch item record modification</span>
36 [% CASE 'batch_item_record_deletion' %]
37 <span>Batch item record deletion</span>
38 [% CASE "batch_hold_cancel" %]
39 <span>Batch hold cancellation</span>
40 [% CASE 'update_elastic_index' %]
41 <span>Update Elasticsearch index</span>
42 [% CASE 'update_holds_queue_for_biblios' %]
43 <span>Holds queue update</span>
44 [% CASE %]<span>Unknown job type '[% job_type | html %]'</span>
48 [% INCLUDE 'doc-head-open.inc' %]
51 Details of job #[% job.id | html %] ›
53 Background jobs ›
54 Administration › Koha
57 [% INCLUDE 'doc-head-close.inc' %]
60 <body id="admin_background_jobs" class="admin">
61 [% INCLUDE 'header.inc' %]
62 [% INCLUDE 'prefs-admin-search.inc' %]
64 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
67 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
70 [% IF CAN_user_parameters_manage_background_jobs %]
72 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
76 <a href="/cgi-bin/koha/admin/background_jobs.pl">Background jobs</a>
79 <a href="#" aria-current="page">Details of job #[% job.id | html %]</a>
83 <a href="#" aria-current="page">Background jobs</a>
88 <a href="#" aria-current="page">Administration</a>
94 <div class="main container-fluid">
96 <div class="col-sm-10 col-sm-push-2">
99 [% FOR m IN messages %]
100 <div class="dialog message">
102 [% CASE 'cannot_view_job' %]
103 <div><i class="fa fa-exclamation error"></i>Insufficient permission to see this job.</div>
110 [% IF op == 'view' %]
111 <h1>Details of job #[% job.id | html %]</h1>
113 [% PROCESS "background_jobs/${job.type}.inc" %]
115 <fieldset class="rows">
117 <li><span class="label">Job ID: </span>[% job.id | html %]</li>
119 <label for="job_status">Status: </label>
120 [% PROCESS show_job_status %]
122 <li><label for="job_progress">Progress: </label>[% job.progress || 0 | html %] / [% job.size | html %]</li>
124 <label for="job_type">Type: </label>
125 [% PROCESS show_job_type job_type => job.type %]
128 <label for="job_enqueued_on">Queued: </label>
129 [% job.enqueued_on | $KohaDates with_hours = 1 %]
132 <label for="job_started_on">Started: </label>
133 [% job.started_on | $KohaDates with_hours = 1 %]
136 <label for="job_ended_on">Ended: </label>
137 [% job.ended_on | $KohaDates with_hours = 1 %]
139 <li><label for="job_data">Report: </label>
140 [% IF job.status != 'new' %][% PROCESS 'report' %][% END %]
142 <li><label for="job_data">Detailed messages: </label>
143 [% IF job.status != 'new' %][% PROCESS 'detail' %][% END %]
148 [% IF CAN_user_parameters_manage_background_jobs %]
149 <fieldset class="action">
150 <a href="/cgi-bin/koha/admin/background_jobs.pl">Return to the job list</a>
155 [% IF op == 'list' %]
157 <h1>Background jobs</h1>
160 <table id="table_background_jobs">
170 <th class="noExport">Actions</th>
174 [% FOREACH job IN jobs %]
176 <td>[% job.id | html %]</td>
178 [% PROCESS show_job_status %]
180 <td>[% job.progress || 0 | html %] / [% job.size | html %]</td>
182 [% PROCESS show_job_type job_type => job.type %]
184 <td>[% job.enqueued_on | $KohaDates with_hours = 1 %]</td>
185 <td>[% job.started_on| $KohaDates with_hours = 1 %]</td>
186 <td>[% job.ended_on| $KohaDates with_hours = 1 %]</td>
188 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/background_jobs.pl?op=view&id=[% job.id | html %]"><i class="fa fa-eye"></i> View</a>
189 [% IF job.status == 'new' || job.status == 'started' %]
190 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/background_jobs.pl?op=cancel&id=[% job.id | html %]"><i class="fa fa-trash"></i> Cancel</a>
198 <div class="dialog message">
199 There are no background jobs yet.
205 </div> <!-- /.col-sm-10.col-sm-push-2 -->
207 <div class="col-sm-2 col-sm-pull-10">
209 [% INCLUDE 'admin-menu.inc' %]
211 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
212 </div> <!-- /.row -->
214 [% MACRO jsinclude BLOCK %]
215 [% Asset.js("js/admin-menu.js") | $raw %]
216 [% INCLUDE 'datatables.inc' %]
218 $(document).ready(function() {
219 $("#table_background_jobs").dataTable($.extend(true, {}, dataTablesDefaults, {
221 { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
223 "aaSorting": [[ 0, "desc" ]],
224 "iDisplayLength": 10,
225 "sPaginationType": "full_numbers"
230 [% IF op == 'view' %]
235 [% INCLUDE 'intranet-bottom.inc' %]