mirror of
https://github.com/cytopia/devilbox.git
synced 2025-01-29 15:44:04 +00:00
DVL-009 Adding Redis DB page
This commit is contained in:
parent
c644913694
commit
e39c66cb8b
@ -103,4 +103,3 @@ function loadClass($class) {
|
||||
// Temporarily disable due to:
|
||||
// https://github.com/cytopia/devilbox/issues/8
|
||||
$ENABLE_VHOST_DNS_CHECK = false;
|
||||
|
||||
|
49
.devilbox/www/htdocs/db_redis.php
Normal file
49
.devilbox/www/htdocs/db_redis.php
Normal file
@ -0,0 +1,49 @@
|
||||
<?php require '../config.php'; ?>
|
||||
<?php if (loadClass('Docker')->getEnv('COMPOSE_OPTIONAL') != 1) {
|
||||
header('Location: /index.php');
|
||||
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 Keys</h1>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<table class="table table-striped ">
|
||||
<thead class="thead-inverse ">
|
||||
<tr>
|
||||
<th>Key</th>
|
||||
<th>Value</th>
|
||||
</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach (loadClass('Redis')->getKeys() as $key => $value): ?>
|
||||
<tr>
|
||||
<td><?php echo $key;?></td>
|
||||
<td><?php print_r($value);?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- /.container -->
|
||||
|
||||
<?php require '../include/footer.php'; ?>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -530,6 +530,8 @@
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<?php endif; ?>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php require '../config.php'; ?>
|
||||
<?php $Docker = loadClass('Docker'); ?>
|
||||
<?php if ($Docker->getEnv('COMPOSE_OPTIONAL') != 1 ) {
|
||||
header();
|
||||
header('Location: /index.php');
|
||||
exit(0);
|
||||
} ?>
|
||||
<!DOCTYPE html>
|
||||
|
@ -162,6 +162,11 @@ class Redis
|
||||
return $this->_redis->info('all');
|
||||
}
|
||||
|
||||
public function getKeys()
|
||||
{
|
||||
return $this->_redis->keys('*');
|
||||
}
|
||||
|
||||
|
||||
/*********************************************************************************
|
||||
*
|
||||
|
@ -28,6 +28,14 @@
|
||||
<a class="nav-link" href="<?php echo $file == $current ? '#' : '/'.$file;?>"><?php echo $name;?><?php echo $file == $current ? ' <span class="sr-only">(current)</span>' : '';?></a>
|
||||
</li>
|
||||
|
||||
<?php if (loadClass('Docker')->getEnv('COMPOSE_OPTIONAL') == 1): ?>
|
||||
<?php $file = 'db_redis.php'; $name = 'Redis DB';?>
|
||||
<li class="nav-item <?php echo $file == $current ? 'active' : '';?>">
|
||||
<a class="nav-link" href="<?php echo $file == $current ? '#' : '/'.$file;?>"><?php echo $name;?><?php echo $file == $current ? ' <span class="sr-only">(current)</span>' : '';?></a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php $file = 'mail.php'; $name = 'Emails';?>
|
||||
<li class="nav-item <?php echo $file == $current ? 'active' : '';?>">
|
||||
<a class="nav-link" href="<?php echo $file == $current ? '#' : '/'.$file;?>"><?php echo $name;?><?php echo $file == $current ? ' <span class="sr-only">(current)</span>' : '';?></a>
|
||||
|
Loading…
x
Reference in New Issue
Block a user