Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 306b73dfb8
Fetching contributors…

Cannot retrieve contributors at this time

61 lines (37 sloc) 1.037 kB
<?php
require_once 'common.inc.php';
if (isset($_GET['reset']) && method_exists($redis, 'resetStat')) {
$redis->resetStat();
header('Location: info.php');
die;
}
// Fetch the info
$info = $redis->info();
$alt = false;
$page['css'][] = 'frame';
$page['js'][] = 'frame';
require 'header.inc.php';
?>
<h2>Info</h2>
<?php if (method_exists($redis, 'resetStat')) { ?>
<p>
<a href="?reset&amp;s=<?php echo $server['id']?>" class="reset">Reset usage statistics</a>
</p>
<?php } ?>
<table>
<tr><th><div>Key</div></th><th><div>Value</div></th></tr>
<?php
foreach ($info as $key => $value) {
if ($key == 'allocation_stats') { // This key is very long to split it into multiple lines
$value = str_replace(',', ",\n", $value);
}
?>
<tr <?php echo $alt ? 'class="alt"' : ''?>><td><div><?php echo format_html($key)?></div></td><td><div><?php echo nl2br(format_html(is_array($value) ? print_r($value, true) : $value))?></div></td></tr>
<?php
$alt = !$alt;
}
?>
</table>
<?php
require 'footer.inc.php';
?>
Jump to Line
Something went wrong with that request. Please try again.