Browse Source

Bug 22417: Add rabbitmq status indicator on the about page

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
20.11.x
Jonathan Druart 1 year ago
parent
commit
2c6e6b12a5
  1. 12
      about.pl
  2. 22
      koha-tmpl/intranet-tmpl/prog/en/modules/about.tt

12
about.pl

@ -43,6 +43,7 @@ use C4::Installer::PerlModules;
use Koha;
use Koha::DateUtils qw(dt_from_string output_pref);
use Koha::Acquisition::Currencies;
use Koha::BackgroundJob;
use Koha::BiblioFrameworks;
use Koha::Email;
use Koha::Patron::Categories;
@ -555,6 +556,17 @@ $template->param( 'bad_yaml_prefs' => \@bad_yaml_prefs ) if @bad_yaml_prefs;
$template->param( warnHiddenBiblionumbers => \@hidden_biblionumbers );
}
{
# BackgroundJob - test connection to message broker
eval {
Koha::BackgroundJob->connect;
};
if ( $@ ) {
warn $@;
$template->param( warnConnectBroker => $@ );
}
}
my %versions = C4::Context::get_versions();
$template->param(

22
koha-tmpl/intranet-tmpl/prog/en/modules/about.tt

@ -113,6 +113,17 @@
[% ELSIF (errZebraConnection) %]
<tr><th scope="row"><strong>Warning</strong> </th><td>Error message from Zebra: [% ( errZebraConnection ) | html %] </td></tr>
[% END %]
<tr>
<th scope="row">Message broker: </th>
<td>
Status:
[% IF warnConnectBroker %]
<span class="status_warn">connection failed</span>
[% ELSE %]
<span class="status_ok">running</span>
[% END %]
</td>
</tr>
<tr>
<th scope="row">Date and time: </th>
<td>[% current_date_and_time | $KohaDates with_hours => 1 %]</td>
@ -184,7 +195,7 @@
</div>
<div id="sysinfo">
[% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnPrefKohaAdminEmailAddress || warnNoActiveCurrency || warnIsRootUser || xml_config_warnings.size || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || has_ai_issues || oauth2_missing_deps || bad_yaml_prefs || warnRelationships || log4perl_errors || config_bcrypt_settings_no_set || warnHiddenBiblionumbers.size %]
[% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnPrefKohaAdminEmailAddress || warnNoActiveCurrency || warnIsRootUser || xml_config_warnings.size || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || has_ai_issues || oauth2_missing_deps || bad_yaml_prefs || warnRelationships || log4perl_errors || config_bcrypt_settings_no_set || warnHiddenBiblionumbers.size || warnConnectBroker %]
[% IF (warnIsRootUser) %]
<h2>Warning regarding current user</h2>
<p>You are logged in as the database administrative user. This is not recommended because some parts of Koha will not function as expected when using this account.</p>
@ -259,6 +270,15 @@
[% END %]
[% END %]
[% IF warnConnectBroker %]
<h2>Impossible to connect to the message broker</h2>
There is an error when trying to connect to the message broker (RabbitMQ), check the Koha log files.
<br/>
Maybe it is not installed and configured correctly?
<br/>
Contact your system administrator.
[% END %]
[% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnPrefKohaAdminEmailAddress || warnNoActiveCurrency || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || oauth2_missing_deps || bad_yaml_prefs || warnIssuingRules || config_bcrypt_settings_no_set || warnHiddenBiblionumbers.size %]
<h2>Warnings regarding the system configuration</h2>
<table>

Loading…
Cancel
Save