Bugzilla – Attachment 57049 Details for
Bug 17261
Add memcached configuration info to about.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 17261: Add memcached configuration info to about.pl
PASSED-QA-Bug-17261-Add-memcached-configuration-in.patch (text/plain), 4.32 KB, created by
Katrin Fischer
on 2016-11-01 16:17:04 UTC
(
hide
)
Description:
[PASSED QA] Bug 17261: Add memcached configuration info to about.pl
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2016-11-01 16:17:04 UTC
Size:
4.32 KB
patch
obsolete
>From 3862f0a2c7051f16056d54bb178612198f6e1fef Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 6 Sep 2016 16:24:40 -0300 >Subject: [PATCH] [PASSED QA] Bug 17261: Add memcached configuration info to > about.pl > >This patch adds a row in the About > System information tab, showing >the current configuration for memcached. > >To test: >- Apply this patch, have memcached configured for the current instance (this is the > default in kohadevbox) >- Make sure you have the memcached server running: > $ sudo service memcached start >- Open the about page in the browser >=> SUCCESS: You get something like: > Memcached: Servers: 127.0.0.1:11211 | Namespace: koha_kohadev | Status: running >- Stop the memcached server: > $ sudo service memcached stop >- Reload the about page >=> SUCCESS: You get something like > Memcached: Servers: 127.0.0.1:11211 | Namespace: koha_kohadev | Status: not running >- Set both MEMCACHED_* variables in the apache config for intranet the empty string: > $ sudo vim /etc/apache2/sites-enabled/kohadev.conf >.. > SetEnv MEMCACHED_SERVERS "" > #"127.0.0.1:11211" > SetEnv MEMCACHED_NAMESPACE "" > #"koha_kohadev" >.. >- Restart apache: > $ sudo service apache2 restart >- Reload the about page >=> SUCCESS: You get something like: > Memcached: Servers: undefined| Namespace: undefined | Status: unknown >- Sign off :-D > >Sponsored-by: ByWater Solutions > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> >--- > about.pl | 12 ++++++++++++ > koha-tmpl/intranet-tmpl/prog/css/staff-global.css | 8 ++++++++ > koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 13 +++++++++++++ > 3 files changed, 33 insertions(+) > >diff --git a/about.pl b/about.pl >index ca8ff9f..0fdceb2 100755 >--- a/about.pl >+++ b/about.pl >@@ -70,6 +70,18 @@ if ( any { /(^psgi\.|^plack\.)/i } keys %ENV ) { > ); > } > >+# Memcached configuration >+ >+my $memcached_servers = $ENV{ MEMCACHED_SERVERS }; >+my $memcached_namespace = $ENV{ MEMCACHED_NAMESPACE }; >+my $memcached_running = C4::Context->ismemcached; >+ >+$template->param( >+ memcached_servers => $ENV{ MEMCACHED_SERVERS }, >+ memcached_namespace => $ENV{ MEMCACHED_NAMESPACE }, >+ memcached_running => C4::Context->ismemcached >+); >+ > # Additional system information for warnings > > my $warnStatisticsFieldsError; >diff --git a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/css/staff-global.css >index c8921f9..ba6c8fb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css >+++ b/koha-tmpl/intranet-tmpl/prog/css/staff-global.css >@@ -807,6 +807,14 @@ fieldset.rows .inputnote { > color: #cc0000; > } > >+.status_ok { >+ background-color: lightgreen; >+} >+ >+.status_warn { >+ background-color: red; >+} >+ > /* Font Awesome icon */ > i.success { > color: green; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >index df2b97b..adea4f3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >@@ -51,6 +51,19 @@ > [% IF (is_psgi) %] > <tr><th scope="row">PSGI: </th><td>[% psgi_server |html %]</td></tr> > [% END %] >+ <tr><th scope="row">Memcached: </th> >+ <td>Servers: [% IF memcached_servers %][% memcached_servers | html %] >+ [% ELSE %]<span>undefined</span>[% END %]| >+ Namespace: [% IF memcached_namespace %][% memcached_namespace | html %] >+ [% ELSE %]<span>undefined</span>[% END %] | >+ Status: [% IF memcached_servers %] >+ [% IF memcached_running %]<span class="status_ok">running</span> >+ [% ELSE %]<span class="status_warn">not running</span>[% END %] >+ [% ELSE %] >+ <span>unknown</span> >+ [% END %] >+ </td> >+ </tr> > <tr><th scope="row">Zebra version: </th><td>[% zebraVersion |html %]</td></tr> > [% IF (errZebraConnection == 10000) %] > <tr><th scope="row"><b>Error</b> </th><td>Zebra server seems not to be available. Is it started?</td></tr> >-- >2.7.4
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 17261
:
55265
|
55297
|
55309
|
55327
|
55328
|
55535
|
55536
|
55537
|
55538
|
55542
| 57049 |
57050
|
57051
|
57052
|
57053