Bugzilla – Attachment 55297 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]
Bug 17261: Add memcached configuration info to about.pl
Bug-17261-Add-memcached-configuration-info-to-abou.patch (text/plain), 4.20 KB, created by
Nick Clemens (kidclamp)
on 2016-09-07 12:59:34 UTC
(
hide
)
Description:
Bug 17261: Add memcached configuration info to about.pl
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2016-09-07 12:59:34 UTC
Size:
4.20 KB
patch
obsolete
>From dfaa443befad8128f861b8e4970ccfeabd1d0efe 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] 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> >--- > 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 525cd0e..3578c3e 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 */ > .error i { > color: #CC0000; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >index f004c75..f2b5e26 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.1.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