mirror of
https://github.com/cytopia/devilbox.git
synced 2025-01-29 15:44:04 +00:00
DVL-009 Adding Redis info page
This commit is contained in:
parent
2c8e56dd7a
commit
c644913694
49
.devilbox/www/htdocs/redisinfo.php
Normal file
49
.devilbox/www/htdocs/redisinfo.php
Normal file
@ -0,0 +1,49 @@
|
||||
<?php require '../config.php'; ?>
|
||||
<?php $Docker = loadClass('Docker'); ?>
|
||||
<?php if ($Docker->getEnv('COMPOSE_OPTIONAL') != 1 ) {
|
||||
header();
|
||||
exit(0);
|
||||
} ?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<?php require '../include/head.php'; ?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<?php require '../include/navbar.php'; ?>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h1>Redis Info</h1>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead class="thead-inverse">
|
||||
<tr>
|
||||
<th>Variable</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach (loadClass('Redis')->getInfo() as $key => $val): ?>
|
||||
<tr>
|
||||
<td><?php echo $key;?></td>
|
||||
<td class="break-word"><code><?php echo $val;?></code></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- /.container -->
|
||||
|
||||
<?php require '../include/footer.php'; ?>
|
||||
</body>
|
||||
</html>
|
@ -157,6 +157,10 @@ class Redis
|
||||
return 'Redis '.$info['redis_version'];
|
||||
}
|
||||
|
||||
public function getInfo()
|
||||
{
|
||||
return $this->_redis->info('all');
|
||||
}
|
||||
|
||||
|
||||
/*********************************************************************************
|
||||
|
@ -41,6 +41,9 @@
|
||||
'mysqlinfo.php' => 'MySQL info',
|
||||
'postgresinfo.php' => 'PostgreSQL info'
|
||||
);
|
||||
if (loadClass('Docker')->getEnv('COMPOSE_OPTIONAL') == 1) {
|
||||
$files['redisinfo.php'] = 'Redis info';
|
||||
}
|
||||
$active = (in_array($script, array_keys($files))) ? 'active' : '';
|
||||
?>
|
||||
<li class="nav-item dropdown <?php echo $active;?>">
|
||||
|
Loading…
x
Reference in New Issue
Block a user