Bug 20484: Implement blocking_errors for ES config page
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
80dc5c36b8
commit
7de19f4e5c
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 %]
|
||||
|
||||
|
|
|
|||
|
|
@ -70,6 +70,8 @@ a.add, a.delete {
|
|||
|
||||
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › 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…
Reference in New Issue