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>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
e67c202609
commit
eedbb1b7ea
12
about.pl
12
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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue