Skip to content
Snippets Groups Projects
Commit d281e0b4 authored by Hanne Moa's avatar Hanne Moa
Browse files

Remove concat: translated row titles

For #455
parent e0c6d99e
No related branches found
No related tags found
No related merge requests found
......@@ -57,7 +57,7 @@ foreach($column_titles as $ct) {
<?php
foreach($table as $row_title => $row_data) {
echo '<tr>' . "\n";
echo '<th class="rowtitle" style="text-align: right">' . $this->t('{memcacheMonitor:memcachestat:' . $row_title . '}') . '</th>' . "\n";
echo '<th class="rowtitle" style="text-align: right">' . $this->t($this->data['rowtitles'][$row_title]) . '</th>' . "\n";
foreach($column_titles as $ct) {
echo '<td>';
......
......@@ -101,8 +101,47 @@ foreach($stats AS $key => &$entry) {
}
$template = new SimpleSAML_XHTML_Template($config, 'memcacheMonitor:memcachestat.tpl.php');
$template->data['title'] = 'Memcache stats';
$template->data['table'] = $stats;
$template->data['statsraw'] = $statsraw;
$template->show();
$t = new SimpleSAML_XHTML_Template($config, 'memcacheMonitor:memcachestat.tpl.php');
$rowTitles = array(
'accepting_conns' => $t->noop('{memcacheMonitor:memcachestat:accepting_conns}'),
'auth_cmds' => $t->noop('{memcacheMonitor:memcachestat:auth_cmds}'),
'auth_errors' => $t->noop('{memcacheMonitor:memcachestat:auth_errors}'),
'bytes' => $t->noop('{memcacheMonitor:memcachestat:bytes}'),
'bytes_read' => $t->noop('{memcacheMonitor:memcachestat:bytes_read}'),
'bytes_written' => $t->noop('{memcacheMonitor:memcachestat:bytes_written}'),
'cas_badval' => $t->noop('{memcacheMonitor:memcachestat:cas_badval}'),
'cas_hits' => $t->noop('{memcacheMonitor:memcachestat:cas_hits}'),
'cas_misses' => $t->noop('{memcacheMonitor:memcachestat:cas_misses}'),
'cmd_get' => $t->noop('{memcacheMonitor:memcachestat:cmd_get}'),
'cmd_set' => $t->noop('{memcacheMonitor:memcachestat:cmd_set}'),
'connection_structures' => $t->noop('{memcacheMonitor:memcachestat:connection_structures}'),
'conn_yields' => $t->noop('{memcacheMonitor:memcachestat:conn_yields}'),
'curr_connections' => $t->noop('{memcacheMonitor:memcachestat:curr_connections}'),
'curr_items' => $t->noop('{memcacheMonitor:memcachestat:curr_items}'),
'decr_hits' => $t->noop('{memcacheMonitor:memcachestat:decr_hits}'),
'decr_misses' => $t->noop('{memcacheMonitor:memcachestat:decr_misses}'),
'delete_hits' => $t->noop('{memcacheMonitor:memcachestat:delete_hits}'),
'delete_misses' => $t->noop('{memcacheMonitor:memcachestat:delete_misses}'),
'evictions' => $t->noop('{memcacheMonitor:memcachestat:evictions}'),
'get_hits' => $t->noop('{memcacheMonitor:memcachestat:get_hits}'),
'get_misses' => $t->noop('{memcacheMonitor:memcachestat:get_misses}'),
'incr_hits' => $t->noop('{memcacheMonitor:memcachestat:incr_hits}'),
'incr_misses' => $t->noop('{memcacheMonitor:memcachestat:incr_misses}'),
'limit_maxbytes' => $t->noop('{memcacheMonitor:memcachestat:limit_maxbytes}'),
'listen_disabled_num' => $t->noop('{memcacheMonitor:memcachestat:listen_disabled_num}'),
'pid' => $t->noop('{memcacheMonitor:memcachestat:pid}'),
'pointer_size' => $t->noop('{memcacheMonitor:memcachestat:pointer_size}'),
'rusage_system' => $t->noop('{memcacheMonitor:memcachestat:rusage_system}'),
'rusage_user' => $t->noop('{memcacheMonitor:memcachestat:rusage_user}'),
'threads' => $t->noop('{memcacheMonitor:memcachestat:threads}'),
'time' => $t->noop('{memcacheMonitor:memcachestat:time}'),
'total_connections' => $t->noop('{memcacheMonitor:memcachestat:total_connections}'),
'total_items' => $t->noop('{memcacheMonitor:memcachestat:total_items}'),
'uptime' => $t->noop('{memcacheMonitor:memcachestat:uptime}'),
'version' => $t->noop('{memcacheMonitor:memcachestat:version}'),
);
$t->data['title'] = 'Memcache stats';
$t->data['rowtitles'] = $rowTitles;
$t->data['table'] = $stats;
$t->data['statsraw'] = $statsraw;
$t->show();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment