[% USE raw %]
[% USE KohaDates %]
[% USE Asset %]
[% USE KohaDates %]
[% SET footerjs = 1 %]
[% BLOCK show_job_status %]
[% SWITCH job.status %]
[% CASE "new" %]
New
[% CASE "cancelled" %]
Cancelled
[% CASE "finished" %]
Finished
[% CASE "started" %]
Started
[% CASE "running" %]
Running
[% CASE "failed" %]
Failed
[% CASE # Default case %]
[% job.status | html %]
[% END -%]
[% END %]
[% BLOCK show_job_type %]
[% SWITCH job_type %]
[% CASE 'batch_biblio_record_modification' %]
Batch bibliographic record modification
[% CASE 'batch_biblio_record_deletion' %]
Batch bibliographic record record deletion
[% CASE 'batch_authority_record_modification' %]
Batch authority record modification
[% CASE 'batch_authority_record_deletion' %]
Batch authority record deletion
[% CASE 'batch_item_record_modification' %]
Batch item record modification
[% CASE 'batch_item_record_deletion' %]
Batch item record deletion
[% CASE "batch_hold_cancel" %]
Batch hold cancellation
[% CASE 'update_elastic_index' %]
Update Elasticsearch index
[% CASE 'update_holds_queue_for_biblios' %]
Holds queue update
[% CASE %]Unknown job type '[% job_type | html %]'
[% END %]
[% END %]
[% INCLUDE 'doc-head-open.inc' %]
[% IF op == 'view' %]
Details of job #[% job.id | html %] ›
[% END %]
Background jobs ›
Administration › Koha
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'header.inc' %]
[% INCLUDE 'prefs-admin-search.inc' %]
[% FOR m IN messages %]
[% SWITCH m.code %]
[% CASE 'cannot_view_job' %]
Insufficient permission to see this job.
[% CASE %]
[% m.code | html %]
[% END %]
[% END %]
[% IF op == 'view' %]
Details of job #[% job.id | html %]
[% PROCESS "background_jobs/${job.type}.inc" %]
[% IF CAN_user_parameters_manage_background_jobs %]
[% END %]
[% END %]
[% IF op == 'list' %]
Background jobs
[% IF jobs.count %]
Job ID
Status
Progress
Type
Queued
Started
Ended
Actions
[% FOREACH job IN jobs %]
[% job.id | html %]
[% PROCESS show_job_status %]
[% job.progress || 0 | html %] / [% job.size | html %]
[% PROCESS show_job_type job_type => job.type %]
[% job.enqueued_on | $KohaDates with_hours = 1 %]
[% job.started_on| $KohaDates with_hours = 1 %]
[% job.ended_on| $KohaDates with_hours = 1 %]
View
[% IF job.status == 'new' || job.status == 'started' %]
Cancel
[% END %]
[% END %]
[% ELSE %]
There are no background jobs yet.
[% END %]
[% END %]
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/admin-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
[% IF op == 'view' %]
[% PROCESS 'js' %]
[% END %]
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]