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 'stage_marc_for_import' %]
45 <span>Staged MARC records for import</span>
46 [% CASE 'marc_import_commit_batch' %]
47 <span>Import MARC records</span>
48 [% CASE 'marc_import_revert_batch' %]
49 <span>Revert import MARC records</span>
50 [% CASE %]<span>Unknown job type '[% job_type | html %]'</span>
54 [% INCLUDE 'doc-head-open.inc' %]
57 Details of job #[% job.id | html %] ›
59 Background jobs ›
60 Administration › Koha
63 [% INCLUDE 'doc-head-close.inc' %]
66 <body id="admin_background_jobs" class="admin">
67 [% INCLUDE 'header.inc' %]
68 [% INCLUDE 'prefs-admin-search.inc' %]
70 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
73 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
76 [% IF CAN_user_parameters_manage_background_jobs %]
78 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
82 <a href="/cgi-bin/koha/admin/background_jobs.pl">Background jobs</a>
85 <a href="#" aria-current="page">Details of job #[% job.id | html %]</a>
89 <a href="#" aria-current="page">Background jobs</a>
94 <a href="#" aria-current="page">Administration</a>
100 <div class="main container-fluid">
102 <div class="col-sm-10 col-sm-push-2">
105 [% FOR m IN messages %]
106 <div class="dialog message">
108 [% CASE 'cannot_view_job' %]
109 <div><i class="fa fa-exclamation error"></i>Insufficient permission to see this job.</div>
116 [% IF op == 'view' %]
117 <h1>Details of job #[% job.id | html %]</h1>
119 [% PROCESS "background_jobs/${job.type}.inc" %]
121 <fieldset class="rows">
123 <li><span class="label">Job ID: </span>[% job.id | html %]</li>
125 <label for="job_status">Status: </label>
126 [% PROCESS show_job_status %]
128 <li><label for="job_progress">Progress: </label>[% job.progress || 0 | html %] / [% job.size | html %]</li>
130 <label for="job_type">Type: </label>
131 [% PROCESS show_job_type job_type => job.type %]
134 <label for="job_enqueued_on">Queued: </label>
135 [% job.enqueued_on | $KohaDates with_hours = 1 %]
138 <label for="job_started_on">Started: </label>
139 [% job.started_on | $KohaDates with_hours = 1 %]
142 <label for="job_ended_on">Ended: </label>
143 [% job.ended_on | $KohaDates with_hours = 1 %]
145 <li><label for="job_data">Report: </label>
146 [% IF job.status != 'new' %][% PROCESS 'report' %][% END %]
148 <li><label for="job_data">Detailed messages: </label>
149 [% IF job.status != 'new' %][% PROCESS 'detail' %][% END %]
154 [% IF CAN_user_parameters_manage_background_jobs %]
155 <fieldset class="action">
156 <a href="/cgi-bin/koha/admin/background_jobs.pl">Return to the job list</a>
161 [% IF op == 'list' %]
163 <h1>Background jobs</h1>
165 <div id="taskstabs" class="toptabs">
166 <ul class="nav nav-tabs" role="tablist">
167 <li role="presentation" class="active"><a href="#queued" aria-controls="queued" role="tab" data-toggle="tab">Queued jobs</a></li>
168 <li role="presentation"><a href="#complete" aria-controls="complete" role="tab" data-toggle="tab">Completed jobs</a></li>
171 <div class="tab-content">
172 <div role="tabpanel" class="tab-pane active" id="queued">
173 [% IF queued.count %]
174 <table id="table_queued_jobs">
183 <th class="noExport">Actions</th>
187 [% FOREACH job IN queued %]
189 <td>[% job.id | html %]</td>
191 [% PROCESS show_job_status %]
193 <td>[% job.progress || 0 | html %] / [% job.size | html %]</td>
195 [% PROCESS show_job_type job_type => job.type %]
197 <td>[% job.enqueued_on | $KohaDates with_hours = 1 %]</td>
198 <td>[% job.started_on| $KohaDates with_hours = 1 %]</td>
200 <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>
201 [% IF job.status == 'new' || job.status == 'started' %]
202 <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>
210 <div class="dialog message">
211 There are no queued background jobs yet.
216 <div role="tabpanel" class="tab-pane" id="complete">
217 [% IF complete.count %]
218 <p>Jobs completed in the last 60 minutes.</p>
219 <table id="table_complete_jobs">
229 <th class="noExport">Actions</th>
233 [% FOREACH job IN complete %]
235 <td>[% job.id | html %]</td>
237 [% PROCESS show_job_status %]
239 <td>[% job.progress || 0 | html %] / [% job.size | html %]</td>
241 [% PROCESS show_job_type job_type => job.type %]
243 <td>[% job.enqueued_on | $KohaDates with_hours = 1 %]</td>
244 <td>[% job.started_on| $KohaDates with_hours = 1 %]</td>
245 <td>[% job.ended_on| $KohaDates with_hours = 1 %]</td>
247 <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>
248 [% IF job.status == 'new' || job.status == 'started' %]
249 <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>
257 <div class="dialog message">
258 There were no completed background jobs completed in the last 60 minutes.
268 </div> <!-- /.col-sm-10.col-sm-push-2 -->
270 <div class="col-sm-2 col-sm-pull-10">
272 [% INCLUDE 'admin-menu.inc' %]
274 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
275 </div> <!-- /.row -->
277 [% MACRO jsinclude BLOCK %]
278 [% Asset.js("js/admin-menu.js") | $raw %]
279 [% INCLUDE 'datatables.inc' %]
281 $(document).ready(function() {
282 $("#table_queued_jobs").dataTable($.extend(true, {}, dataTablesDefaults, {
284 { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
286 "aaSorting": [[ 0, "desc" ]],
287 "iDisplayLength": 10,
288 "sPaginationType": "full_numbers"
291 $("#table_complete_jobs").dataTable($.extend(true, {}, dataTablesDefaults, {
293 { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
295 "aaSorting": [[ 0, "desc" ]],
296 "iDisplayLength": 10,
297 "sPaginationType": "full_numbers"
301 [% IF op == 'view' %]
306 [% INCLUDE 'intranet-bottom.inc' %]