View | Details | Raw Unified | Return to bug 30982
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt (-55 / +24 lines)
Lines 3-56 Link Here
3
[% USE Asset %]
3
[% USE Asset %]
4
[% USE KohaDates %]
4
[% USE KohaDates %]
5
[% SET footerjs = 1 %]
5
[% SET footerjs = 1 %]
6
[% BLOCK show_job_status %]
7
    [% SWITCH job.status %]
8
        [% CASE "new" %]
9
            <span>New</span>
10
        [% CASE "cancelled" %]
11
            <span>Cancelled</span>
12
        [% CASE "finished" %]
13
            <span>Finished</span>
14
        [% CASE "started" %]
15
            <span>Started</span>
16
        [% CASE "running" %]
17
            <span>Running</span>
18
        [% CASE "failed" %]
19
            <span>Failed</span>
20
        [% CASE # Default case %]
21
            [% job.status | html %]
22
    [% END -%]
23
[% END %]
24
[% BLOCK show_job_type %]
25
    [% SWITCH 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>
51
    [% END %]
52
53
[% END %]
54
[% INCLUDE 'doc-head-open.inc' %]
6
[% INCLUDE 'doc-head-open.inc' %]
55
<title>
7
<title>
56
    [% IF op == 'view' %]
8
    [% IF op == 'view' %]
Lines 118-134 Link Here
118
70
119
    [% PROCESS "background_jobs/${job.type}.inc" %]
71
    [% PROCESS "background_jobs/${job.type}.inc" %]
120
72
121
    <fieldset class="rows">
73
    <fieldset class="rows" style="display:none;">
122
        <ol>
74
        <ol>
123
            <li><span class="label">Job ID: </span>[% job.id | html %]</li>
75
            <li><span class="label">Job ID: </span>[% job.id | html %]</li>
124
            <li>
76
            <li>
125
                <label for="job_status">Status: </label>
77
                <label for="job_status">Status: </label>
126
                [% PROCESS show_job_status %]
78
                <span id="job_status_description"></span>
127
            </li>
79
            </li>
128
            <li><label for="job_progress">Progress: </label>[% job.progress || 0 | html %] / [% job.size | html %]</li>
80
            <li><label for="job_progress">Progress: </label>[% job.progress || 0 | html %] / [% job.size | html %]</li>
129
            <li>
81
            <li>
130
                <label for="job_type">Type: </label>
82
                <label for="job_type">Type: </label>
131
                [% PROCESS show_job_type job_type => job.type %]
83
                <span id="job_type_description"></span>
132
            </li>
84
            </li>
133
            <li>
85
            <li>
134
                <label for="job_enqueued_on">Queued: </label>
86
                <label for="job_enqueued_on">Queued: </label>
Lines 249-261 Link Here
249
                '_str': _("Batch hold cancellation")
201
                '_str': _("Batch hold cancellation")
250
            },
202
            },
251
            {
203
            {
252
                '_id': 'update_elastic_index'
204
                '_id': 'update_elastic_index',
253
                , '_str': _("Update Elasticsearch index")
205
                '_str': _("Update Elasticsearch index")
254
            },
206
            },
255
            {
207
            {
256
                '_id': 'update_holds_queue_for_biblios',
208
                '_id': 'update_holds_queue_for_biblios',
257
                '_str': _("Holds queue update")
209
                '_str': _("Holds queue update")
258
            }
210
            },
211
            {
212
                '_id': 'stage_marc_for_import',
213
                '_str': _("Staged MARC records for import")
214
            },
215
            {
216
                '_id': 'marc_import_commit_batch',
217
                '_str': _("Import MARC records")
218
            },
219
            {
220
                '_id': 'marc_import_revert_batch',
221
                '_str': _("Revert import MARC records")
222
            },
259
        ];
223
        ];
260
224
261
        function get_job_type (job_type) {
225
        function get_job_type (job_type) {
Lines 267-272 Link Here
267
        }
231
        }
268
232
269
        $(document).ready(function() {
233
        $(document).ready(function() {
234
            [% IF op == 'view' %]
235
                $("#job_status_description").html( get_job_status("[% job.status | html %]") );
236
                $("#job_type_description").html( get_job_type("[% job.type | html %]") );
237
                $("fieldset.rows").show();
238
            [% END %]
239
270
            let additional_filters = {
240
            let additional_filters = {
271
                started_on: function(){
241
                started_on: function(){
272
                    let now = new Date();
242
                    let now = new Date();
273
- 

Return to bug 30982