Browse Source

Bug 20484: Implement blocking_errors for ES config page

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20.05.x
Nick Clemens 1 year ago
committed by Martin Renvoize
parent
commit
7de19f4e5c
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 8
      admin/searchengine/elasticsearch/mappings.pl
  2. 2
      koha-tmpl/intranet-tmpl/prog/en/includes/blocking_errors.inc
  3. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt

8
admin/searchengine/elasticsearch/mappings.pl

@ -24,12 +24,13 @@ use C4::Output;
use C4::Auth;
use Koha::SearchEngine::Elasticsearch;
use Koha::SearchEngine::Elasticsearch::Indexer;
use Koha::SearchMarcMaps;
use Koha::SearchFields;
use Koha::Caches;
use Try::Tiny;
use Module::Load::Conditional qw(can_load);
my $input = new CGI;
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
@ -41,6 +42,11 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
}
);
unless ( can_load( modules => { 'Koha::SearchEngine::Elasticsearch::Indexer' => undef } ) ) {
output_and_exit( $input, $cookie, $template, 'missing_es_modules');
}
my $index = $input->param('index') || 'biblios';
my $op = $input->param('op') || 'list';
my @messages;

2
koha-tmpl/intranet-tmpl/prog/en/includes/blocking_errors.inc

@ -17,6 +17,8 @@
<div class="dialog message">The form submission failed (Wrong CSRF token). Try to come back, refresh the page, then try again.</div>
[% CASE 'budget_is_locked' %]
<div class="dialog message">The budget is locked, fund creation is not possible.</div>
[% CASE 'missing_es_modules' %]
<div class="dialog message">Necessary Elasticsearch packages are not installed on your server. Please contact your server admin if you wish to configure Elasticsearch</div>
[% CASE %][% blocking_error | html %]
[% END %]

2
koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt

@ -70,6 +70,8 @@ a.add, a.delete {
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; Search engine configuration (Elasticsearch)</div>
[% INCLUDE 'blocking_errors.inc' %]
<div class="main container-fluid">
<div class="row">
<div class="col-sm-10 col-sm-push-2">

Loading…
Cancel
Save