REL-0.9 Check if container are running

This commit is contained in:
cytopia 2017-05-08 09:43:43 +02:00
parent d9a255ae6a
commit dfa8ff99dc
No known key found for this signature in database
GPG Key ID: 6D56EDB8695128A2
9 changed files with 196 additions and 155 deletions

View File

@ -1,4 +1,5 @@
<?php require '../config.php'; ?> <?php require '../config.php'; ?>
<?php $Postgres = loadClass('Memcd'); ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
@ -17,6 +18,9 @@
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<?php if (!\devilbox\Memcd::isAvailable($GLOBALS['MEMCD_HOST_NAME'])): ?>
<p>Memcahed container is not running.</p>
<?php else: ?>
<table class="table table-striped "> <table class="table table-striped ">
<thead class="thead-inverse "> <thead class="thead-inverse ">
<tr> <tr>
@ -33,6 +37,7 @@
<?php endforeach; ?> <?php endforeach; ?>
</tbody> </tbody>
</table> </table>
<?php endif; ?>
</div> </div>
</div> </div>

View File

@ -18,6 +18,9 @@
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<?php if (!\devilbox\Mysql::isAvailable($GLOBALS['MYSQL_HOST_NAME'])): ?>
<p>MySQL container is not running.</p>
<?php else: ?>
<table class="table table-striped "> <table class="table table-striped ">
<thead class="thead-inverse "> <thead class="thead-inverse ">
<tr> <tr>
@ -45,6 +48,7 @@
<?php endforeach; ?> <?php endforeach; ?>
</tbody> </tbody>
</table> </table>
<?php endif; ?>
</div> </div>
</div> </div>

View File

@ -18,6 +18,9 @@
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<?php if (!\devilbox\Pgsql::isAvailable($GLOBALS['PGSQL_HOST_NAME'])): ?>
<p>PgSQL container is not running.</p>
<?php else: ?>
<table class="table table-striped "> <table class="table table-striped ">
<thead class="thead-inverse "> <thead class="thead-inverse ">
<tr> <tr>
@ -55,6 +58,7 @@
<?php endforeach; ?> <?php endforeach; ?>
</tbody> </tbody>
</table> </table>
<?php endif; ?>
</div> </div>
</div> </div>

View File

@ -1,4 +1,5 @@
<?php require '../config.php'; ?> <?php require '../config.php'; ?>
<?php $Postgres = loadClass('Redis'); ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
@ -17,6 +18,9 @@
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<?php if (!\devilbox\Redis::isAvailable($GLOBALS['REDIS_HOST_NAME'])): ?>
<p>Redis container is not running.</p>
<?php else: ?>
<table class="table table-striped "> <table class="table table-striped ">
<thead class="thead-inverse "> <thead class="thead-inverse ">
<tr> <tr>
@ -33,6 +37,7 @@
<?php endforeach; ?> <?php endforeach; ?>
</tbody> </tbody>
</table> </table>
<?php endif; ?>
</div> </div>
</div> </div>

View File

@ -1,4 +1,5 @@
<?php require '../config.php'; ?> <?php require '../config.php'; ?>
<?php $Postgres = loadClass('Memcd'); ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
@ -17,6 +18,9 @@
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<?php if (!\devilbox\Memcd::isAvailable($GLOBALS['MEMCD_HOST_NAME'])): ?>
<p>Memcahed container is not running.</p>
<?php else: ?>
<?php foreach (loadClass('Memcd')->getInfo() as $srv => $data): ?> <?php foreach (loadClass('Memcd')->getInfo() as $srv => $data): ?>
<h2><?php echo $srv; ?></h2> <h2><?php echo $srv; ?></h2>
<table class="table table-striped"> <table class="table table-striped">
@ -36,6 +40,7 @@
</tbody> </tbody>
</table> </table>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>
</div> </div>
</div> </div>

View File

@ -1,4 +1,5 @@
<?php require '../config.php'; ?> <?php require '../config.php'; ?>
<?php $MySQL = loadClass('Mysql'); ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
@ -17,6 +18,9 @@
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<?php if (!\devilbox\Mysql::isAvailable($GLOBALS['MYSQL_HOST_NAME'])): ?>
<p>MySQL container is not running.</p>
<?php else: ?>
<p>For reference see here:</p> <p>For reference see here:</p>
<ul> <ul>
<li><a target="_blank" href="https://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html">https://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html</a></li> <li><a target="_blank" href="https://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html">https://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html</a></li>
@ -40,6 +44,7 @@
<?php endforeach; ?> <?php endforeach; ?>
</tbody> </tbody>
</table> </table>
<?php endif; ?>
</div> </div>
</div> </div>

View File

@ -1,4 +1,5 @@
<?php require '../config.php'; ?> <?php require '../config.php'; ?>
<?php $Postgres = loadClass('Pgsql'); ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
@ -17,6 +18,9 @@
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<?php if (!\devilbox\Pgsql::isAvailable($GLOBALS['PGSQL_HOST_NAME'])): ?>
<p>PgSQL container is not running.</p>
<?php else: ?>
<table class="table table-striped"> <table class="table table-striped">
<thead class="thead-inverse"> <thead class="thead-inverse">
<tr> <tr>
@ -33,6 +37,7 @@
<?php endforeach; ?> <?php endforeach; ?>
</tbody> </tbody>
</table> </table>
<?php endif; ?>
</div> </div>
</div> </div>

View File

@ -1,4 +1,5 @@
<?php require '../config.php'; ?> <?php require '../config.php'; ?>
<?php $Postgres = loadClass('Redis'); ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
@ -17,6 +18,9 @@
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<?php if (!\devilbox\Redis::isAvailable($GLOBALS['REDIS_HOST_NAME'])): ?>
<p>Redis container is not running.</p>
<?php else: ?>
<table class="table table-striped"> <table class="table table-striped">
<thead class="thead-inverse"> <thead class="thead-inverse">
<tr> <tr>
@ -33,6 +37,7 @@
<?php endforeach; ?> <?php endforeach; ?>
</tbody> </tbody>
</table> </table>
<?php endif; ?>
</div> </div>
</div> </div>

View File

@ -12,6 +12,9 @@ class _Base
* *
*********************************************************************************/ *********************************************************************************/
/** TODO: isAvailable (make instance) */
private static $_available = array(); private static $_available = array();
private static $_hostname = array(); private static $_hostname = array();