Bugzilla – Attachment 109475 Details for
Bug 22417
Add a task queue
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22417: Add rabbitmq status indicator on the about page
Bug-22417-Add-rabbitmq-status-indicator-on-the-abo.patch (text/plain), 5.02 KB, created by
Jonathan Druart
on 2020-09-02 09:59:33 UTC
(
hide
)
Description:
Bug 22417: Add rabbitmq status indicator on the about page
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-09-02 09:59:33 UTC
Size:
5.02 KB
patch
obsolete
>From 4e1e016d30dc8a596ceae77e1e237e4f9990536b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 2 Sep 2020 11:17:15 +0200 >Subject: [PATCH] Bug 22417: Add rabbitmq status indicator on the about page > >--- > about.pl | 12 ++++++++++ > .../intranet-tmpl/prog/en/modules/about.tt | 22 ++++++++++++++++++- > 2 files changed, 33 insertions(+), 1 deletion(-) > >diff --git a/about.pl b/about.pl >index 029bd94833..27f3dcd5c4 100755 >--- a/about.pl >+++ b/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::Patron::Categories; > use Koha::Patrons; >@@ -553,6 +554,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( >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >index 1113f9f5fd..46a50b56b5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >@@ -113,6 +113,17 @@ > [% ELSIF (errZebraConnection) %] > <tr><th scope="row"><b>Warning</b> </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 || 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 || 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 || 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> >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22417
:
105542
|
105543
|
107385
|
107386
|
107387
|
107388
|
107389
|
107390
|
107391
|
107392
|
107393
|
107394
|
107395
|
107396
|
107397
|
107398
|
107399
|
107400
|
107401
|
107402
|
107403
|
107404
|
107405
|
107406
|
107481
|
107482
|
107682
|
108023
|
108024
|
108025
|
108026
|
108027
|
108028
|
108029
|
108030
|
108031
|
108032
|
108033
|
108034
|
108035
|
108036
|
108037
|
108038
|
108039
|
108040
|
108041
|
108042
|
108043
|
108044
|
108045
|
108046
|
108047
|
109270
|
109271
|
109319
|
109320
|
109321
|
109322
|
109323
|
109324
|
109325
|
109326
|
109327
|
109328
|
109329
|
109330
|
109331
|
109332
|
109333
|
109334
|
109335
|
109336
|
109337
|
109338
|
109339
|
109340
|
109341
|
109342
|
109343
|
109344
|
109345
|
109350
|
109351
|
109355
|
109390
|
109391
|
109392
|
109393
|
109394
|
109395
|
109396
|
109397
|
109398
|
109399
|
109400
|
109401
|
109402
|
109403
|
109404
|
109405
|
109406
|
109407
|
109408
|
109409
|
109410
|
109411
|
109412
|
109413
|
109414
|
109415
|
109416
|
109417
|
109418
|
109474
|
109475
|
109476
|
109477
|
110150
|
111091
|
111092
|
111093
|
111094
|
111095
|
111096
|
111097
|
111098
|
111099
|
111100
|
111101
|
111102
|
111103
|
111104
|
111105
|
111106
|
111107
|
111108
|
111109
|
111110
|
111111
|
111112
|
111113
|
111114
|
111115
|
111116
|
111117
|
111118
|
111119
|
111120
|
111121
|
111238
|
111239
|
111245