Bug 33316: Improve display of ES indexer jobs
We don't do a lot of processing to the data, but we can still make the display a bit nicer, to show how many records were done, and show the record ids. To test: 1 - Do some batch modifications on a system running ES 2 - Check background jobs to see ES jobs 3 - Note display 4 - Apply patch 5 - Confirm display is improved Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
8fcc61e82e
commit
dad9430b7b
1 changed files with 18 additions and 8 deletions
|
@ -1,18 +1,19 @@
|
|||
[% USE Koha %]
|
||||
|
||||
[% SET report = job.decoded_data %]
|
||||
[% BLOCK report %]
|
||||
[% SET report = job.report %]
|
||||
[% IF report %]
|
||||
[% IF report.total_records == 1 %]
|
||||
[% IF report.total_success == 1 %]
|
||||
<div class="dialog message">The records have successfully been reindexed!</div>
|
||||
[% END %]
|
||||
[% IF job.status == 'finished' %]
|
||||
[% IF report %]
|
||||
<div class="dialog message">
|
||||
[% report.record_ids.size | html %] records have successfully been reindexed.
|
||||
</div>
|
||||
[% ELSE %]
|
||||
<div class="dialog message">
|
||||
[% report.total_success | html %] / [% report.total_records | html %] records have successfully been reindexed. Some errors occurred.
|
||||
[% IF job.status == 'cancelled' %]<span>The job has been cancelled before it finished.</span>[% END %]
|
||||
Job data could not be read, see the logs for details
|
||||
</div>
|
||||
[% END %]
|
||||
[% ELSIF job.status == 'cancelled' %]
|
||||
<span>The job has been cancelled before it finished.</span>
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
|
@ -32,7 +33,16 @@
|
|||
[% END %]
|
||||
</div>
|
||||
[% END %]
|
||||
[% IF report %]
|
||||
<h2> Record ids:</h2>
|
||||
<ul>
|
||||
[% FOREACH record_id IN report.record_ids %]
|
||||
<li>[% record_id | html %]</li>
|
||||
[% END %]
|
||||
</ul>
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
|
||||
[% BLOCK js %]
|
||||
[% END %]
|
||||
|
|
Loading…
Reference in a new issue