devilbox/.devilbox/www/htdocs/index.php

933 lines
29 KiB
PHP
Raw Normal View History

2016-11-06 12:36:07 +00:00
<?php require '../config.php'; ?>
<?php loadClass('Helper')->authPage(); ?>
2017-05-06 09:14:01 +00:00
<?php
/*********************************************************************************
*
* I N I T I A L I Z A T I O N
*
*********************************************************************************/
/*************************************************************
* Get availability
*************************************************************/
2017-05-15 06:56:17 +00:00
$avail_php = loadClass('Php')->isAvailable();
$avail_dns = loadClass('Dns')->isAvailable();
$avail_httpd = loadClass('Httpd')->isAvailable();
$avail_mysql = loadClass('Mysql')->isAvailable();
$avail_pgsql = loadClass('Pgsql')->isAvailable();
$avail_redis = loadClass('Redis')->isAvailable();
$avail_memcd = loadClass('Memcd')->isAvailable();
2017-05-22 21:20:20 +00:00
$avail_mongo = loadClass('Mongo')->isAvailable();
2017-05-06 09:14:01 +00:00
/*************************************************************
* Test Connectivity
*************************************************************/
$connection = array();
$error = null;
2017-05-15 06:56:17 +00:00
// ---- HTTPD (required) ----
2017-05-06 09:14:01 +00:00
$host = $GLOBALS['HTTPD_HOST_NAME'];
2017-05-15 06:56:17 +00:00
$succ = loadClass('Httpd')->canConnect($error, $host);
2017-05-06 09:14:01 +00:00
$connection['Httpd'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
2017-05-15 06:56:17 +00:00
$host = loadClass('Httpd')->getIpAddress();
$succ = loadClass('Httpd')->canConnect($error, $host);
2017-05-06 09:14:01 +00:00
$connection['Httpd'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
2017-05-15 06:56:17 +00:00
$host = 'random.'.loadClass('Httpd')->getTldSuffix();
$succ = loadClass('Httpd')->canConnect($error, $host);
2017-05-06 09:14:01 +00:00
$connection['Httpd'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
// ---- MYSQL ----
if ($avail_mysql) {
$host = $GLOBALS['MYSQL_HOST_NAME'];
2017-05-15 06:56:17 +00:00
$succ = loadClass('Mysql')->canConnect($error, $host, array('user' => 'root', 'pass' => loadClass('Helper')->getEnv('MYSQL_ROOT_PASSWORD')));
2017-05-06 09:14:01 +00:00
$connection['MySQL'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
2017-05-15 06:56:17 +00:00
$host = loadClass('Mysql')->getIpAddress();
$succ = loadClass('Mysql')->canConnect($error, $host, array('user' => 'root', 'pass' => loadClass('Helper')->getEnv('MYSQL_ROOT_PASSWORD')));
2017-05-06 09:14:01 +00:00
$connection['MySQL'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
$host = '127.0.0.1';
2017-05-15 06:56:17 +00:00
$succ = loadClass('Mysql')->canConnect($error, $host, array('user' => 'root', 'pass' => loadClass('Helper')->getEnv('MYSQL_ROOT_PASSWORD')));
2017-05-06 09:14:01 +00:00
$connection['MySQL'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
}
// ---- PGSQL ----
if ($avail_pgsql) {
$host = $GLOBALS['PGSQL_HOST_NAME'];
2017-05-15 06:56:17 +00:00
$succ = loadClass('Pgsql')->canConnect($error, $host, array('user' => loadClass('Helper')->getEnv('PGSQL_ROOT_USER'), 'pass' => loadClass('Helper')->getEnv('PGSQL_ROOT_PASSWORD')));
2017-05-06 09:14:01 +00:00
$connection['PgSQL'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
2017-05-15 06:56:17 +00:00
$host = loadClass('Pgsql')->getIpAddress();
$succ = loadClass('Pgsql')->canConnect($error, $host, array('user' => loadClass('Helper')->getEnv('PGSQL_ROOT_USER'), 'pass' => loadClass('Helper')->getEnv('PGSQL_ROOT_PASSWORD')));
2017-05-06 09:14:01 +00:00
$connection['PgSQL'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
$host = '127.0.0.1';
2017-05-15 06:56:17 +00:00
$succ = loadClass('Pgsql')->canConnect($error, $host, array('user' => loadClass('Helper')->getEnv('PGSQL_ROOT_USER'), 'pass' => loadClass('Helper')->getEnv('PGSQL_ROOT_PASSWORD')));
2017-05-06 09:14:01 +00:00
$connection['PgSQL'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
}
// ---- REDIS ----
if ($avail_redis) {
$host = $GLOBALS['REDIS_HOST_NAME'];
2017-05-15 06:56:17 +00:00
$succ = loadClass('Redis')->canConnect($error, $host);
2017-05-06 09:14:01 +00:00
$connection['Redis'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
2017-05-15 06:56:17 +00:00
$host = loadClass('Redis')->getIpAddress();
$succ = loadClass('Redis')->canConnect($error, $host);
2017-05-06 09:14:01 +00:00
$connection['Redis'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
$host = '127.0.0.1';
2017-05-15 06:56:17 +00:00
$succ = loadClass('Redis')->canConnect($error, $host);
2017-05-06 09:14:01 +00:00
$connection['Redis'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
}
2017-05-06 09:14:01 +00:00
// ---- MEMCACHED ----
if ($avail_memcd) {
$host = $GLOBALS['MEMCD_HOST_NAME'];
2017-05-15 06:56:17 +00:00
$succ = loadClass('Memcd')->canConnect($error, $host);
2017-05-06 09:14:01 +00:00
$connection['Memcached'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
2017-05-15 06:56:17 +00:00
$host = loadClass('Memcd')->getIpAddress();
$succ = loadClass('Memcd')->canConnect($error, $host);
2017-05-06 09:14:01 +00:00
$connection['Memcached'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
$host = '127.0.0.1';
2017-05-15 06:56:17 +00:00
$succ = loadClass('Memcd')->canConnect($error, $host);
2017-05-06 09:14:01 +00:00
$connection['Memcached'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
}
2017-05-22 21:20:20 +00:00
// ---- MONGO ----
if ($avail_mongo) {
$host = $GLOBALS['MONGO_HOST_NAME'];
$succ = loadClass('Mongo')->canConnect($error, $host);
$connection['MongoDB'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
$host = loadClass('Mongo')->getIpAddress();
$succ = loadClass('Mongo')->canConnect($error, $host);
$connection['MongoDB'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
$host = '127.0.0.1';
$succ = loadClass('Mongo')->canConnect($error, $host);
$connection['MongoDB'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
}
2017-05-15 06:56:17 +00:00
// ---- BIND (required)----
$host = $GLOBALS['DNS_HOST_NAME'];
$succ = loadClass('Dns')->canConnect($error, $host);
$connection['Bind'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
$host = loadClass('Dns')->getIpAddress();
$succ = loadClass('Dns')->canConnect($error, $host);
$connection['Bind'][$host] = array(
'error' => $error,
'host' => $host,
'succ' => $succ
);
2017-05-06 09:14:01 +00:00
/*************************************************************
* Test Health
*************************************************************/
$HEALTH_TOTAL = 0;
$HEALTH_FAILS = 0;
foreach ($connection as $docker) {
foreach ($docker as $conn) {
if (!$conn['succ']) {
$HEALTH_FAILS++;
}
$HEALTH_TOTAL++;
}
}
$HEALTH_PERCENT = 100 - ceil(100 * $HEALTH_FAILS / $HEALTH_TOTAL);
/*********************************************************************************
*
* H T M L
*
*********************************************************************************/
?>
2016-10-09 16:47:49 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
2017-05-15 06:56:17 +00:00
<?php echo loadClass('Html')->getHead(true); ?>
2016-10-09 16:47:49 +00:00
</head>
2017-05-06 09:14:01 +00:00
<body style="background: #1f1f1f;">
2017-05-15 06:56:17 +00:00
<?php echo loadClass('Html')->getNavbar(); ?>
2016-10-09 16:47:49 +00:00
2017-05-06 09:14:01 +00:00
2016-10-22 14:39:08 +00:00
<div class="container">
2016-10-09 16:47:49 +00:00
2017-05-06 09:14:01 +00:00
<!-- ############################################################ -->
<!-- Version/Health -->
<!-- ############################################################ -->
2016-10-22 14:39:08 +00:00
<div class="row">
2017-05-06 09:14:01 +00:00
<div class="col-md-4 col-sm-4 col-xs-12 col-margin">
<div class="dash-box">
<div class="dash-box-head"><i class="fa fa-hashtag"></i> Version</div>
<div class="dash-box-body">
<strong>Devilbox</strong> <?php echo $GLOBALS['DEVILBOX_VERSION']; ?> <small>(<?php echo $GLOBALS['DEVILBOX_DATE']; ?>)</small>
</div>
</div>
2016-10-22 14:39:08 +00:00
</div>
2016-10-09 16:47:49 +00:00
2017-05-06 09:14:01 +00:00
<div class="col-md-4 col-sm-4 col-xs-12 col-margin">
2017-10-16 07:17:27 +00:00
<img src="/assets/img/banner.png" style="width:100%;" />
2017-05-06 09:14:01 +00:00
</div>
2016-10-09 16:47:49 +00:00
2017-05-06 09:14:01 +00:00
<div class="col-md-4 col-sm-4 col-xs-12 col-margin">
<div class="dash-box">
<div class="dash-box-head"><i class="fa fa-bug" aria-hidden="true"></i> Health</div>
<div class="dash-box-body">
<div class="meter">
<span style="color:black; width: <?php echo $HEALTH_PERCENT; ?>%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $HEALTH_PERCENT; ?>%</span>
2016-10-22 14:39:08 +00:00
</div>
</div>
</div>
</div>
2016-10-09 16:47:49 +00:00
2017-05-06 09:14:01 +00:00
</div><!-- /row -->
<!-- ############################################################ -->
<!-- DASH -->
<!-- ############################################################ -->
<div class="row">
<div class="col-md-4 col-sm-4 col-xs-12 col-margin">
<div class="dash-box">
<div class="dash-box-head"><i class="fa fa-cog" aria-hidden="true"></i> Base Stack</div>
<div class="dash-box-body">
<div class="row">
<div class="col-xl-4 col-lg-6 col-md-6 col-sm-12 col-xs-4" style="margin-bottom:15px;">
2017-05-15 06:56:17 +00:00
<?php echo loadClass('Html')->getCirle('dns'); ?>
2017-05-06 09:14:01 +00:00
</div>
<div class="col-xl-4 col-lg-6 col-md-6 col-sm-12 col-xs-4" style="margin-bottom:15px;">
2017-05-15 06:56:17 +00:00
<?php echo loadClass('Html')->getCirle('php'); ?>
2017-05-06 09:14:01 +00:00
</div>
<div class="col-xl-4 col-lg-6 col-md-6 col-sm-12 col-xs-4" style="margin-bottom:15px;">
2017-05-15 06:56:17 +00:00
<?php echo loadClass('Html')->getCirle('httpd'); ?>
2016-10-22 14:39:08 +00:00
</div>
</div>
</div>
</div>
</div>
2016-10-09 16:47:49 +00:00
2017-05-06 09:14:01 +00:00
<div class="col-md-4 col-sm-4 col-xs-12 col-margin">
<div class="dash-box">
<div class="dash-box-head"><i class="fa fa-database" aria-hidden="true"></i> SQL Stack</div>
<div class="dash-box-body">
<div class="row">
<div class="col-xl-4 col-lg-6 col-md-6 col-sm-12 col-xs-4" style="margin-bottom:15px;">
2017-05-15 06:56:17 +00:00
<?php echo loadClass('Html')->getCirle('mysql'); ?>
2017-05-06 09:14:01 +00:00
</div>
<div class="col-xl-4 col-lg-6 col-md-6 col-sm-12 col-xs-4" style="margin-bottom:15px;">
2017-05-15 06:56:17 +00:00
<?php echo loadClass('Html')->getCirle('pgsql'); ?>
2016-10-22 14:39:08 +00:00
</div>
</div>
</div>
</div>
</div>
2016-11-15 18:39:11 +00:00
2017-05-06 09:14:01 +00:00
<div class="col-md-4 col-sm-4 col-xs-12 col-margin">
<div class="dash-box">
<div class="dash-box-head"><i class="fa fa-file-o" aria-hidden="true"></i> NoSQL Stack</div>
<div class="dash-box-body">
<div class="row">
<div class="col-xl-4 col-lg-6 col-md-6 col-sm-12 col-xs-4" style="margin-bottom:15px;">
2017-05-15 06:56:17 +00:00
<?php echo loadClass('Html')->getCirle('redis'); ?>
2017-05-06 09:14:01 +00:00
</div>
<div class="col-xl-4 col-lg-6 col-md-6 col-sm-12 col-xs-4" style="margin-bottom:15px;">
2017-05-15 06:56:17 +00:00
<?php echo loadClass('Html')->getCirle('memcd'); ?>
2017-05-06 09:14:01 +00:00
</div>
<div class="col-xl-4 col-lg-6 col-md-6 col-sm-12 col-xs-4" style="margin-bottom:15px;">
2017-05-22 21:20:20 +00:00
<?php echo loadClass('Html')->getCirle('mongo'); ?>
2016-11-15 18:39:11 +00:00
</div>
</div>
</div>
</div>
</div>
2017-05-06 09:14:01 +00:00
</div><!-- /row -->
2016-11-15 18:39:11 +00:00
2016-10-09 16:47:49 +00:00
2017-05-06 09:14:01 +00:00
<!-- ############################################################ -->
<!-- Settings / Status -->
<!-- ############################################################ -->
2016-10-09 16:47:49 +00:00
2016-10-22 14:39:08 +00:00
<div class="row">
2017-05-06 09:14:01 +00:00
<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12 col-margin">
<div class="dash-box">
<div class="dash-box-head"><i class="fa fa-info-circle" aria-hidden="true"></i> PHP Container Setup</div>
<div class="dash-box-body">
<table class="table table-striped table-hover table-bordered table-sm font-small">
<p><small>You can also enter the php container and work from inside. The following is available inside the container:</small></p>
2017-05-06 09:14:01 +00:00
<thead class="thead-inverse">
<tr>
<th colspan="2">Settings</th>
</tr>
</thead>
<tbody>
<tr>
<th>uid</th>
<td><?php echo loadClass('Php')->getUid(); ?></td>
</tr>
<tr>
<th>gid</th>
<td><?php echo loadClass('Php')->getGid(); ?></td>
</tr>
<tr>
<th>vHost docroot dir</th>
<td><?php echo loadClass('Helper')->getEnv('HTTPD_DOCROOT_DIR'); ?></td>
</tr>
<tr>
<th>vHost config dir</th>
<td><?php echo loadClass('Helper')->getEnv('HTTPD_TEMPLATE_DIR'); ?></td>
</tr>
2017-05-06 09:14:01 +00:00
<tr>
<th>vHost TLD</th>
2017-05-15 06:56:17 +00:00
<td>*.<?php echo loadClass('Httpd')->getTldSuffix(); ?></td>
2017-05-06 09:14:01 +00:00
</tr>
<tr>
<th>DNS</th>
<td><?php if ($avail_dns): ?>Enabled<?php else: ?><span class="text-danger">Offline</span><?php endif;?></td>
2017-05-06 09:14:01 +00:00
</tr>
<tr>
<th>Postfix</th>
2017-05-15 06:56:17 +00:00
<td><?php echo loadClass('Helper')->getEnv('ENABLE_MAIL') ? 'Enabled' : '<span class="bg-danger">No</span> Disabled';?></td>
2017-05-06 09:14:01 +00:00
</tr>
</tbody>
</table>
<table class="table table-striped table-hover table-bordered table-sm font-small">
<thead class="thead-inverse">
<tr>
<th colspan="2">Tools</th>
</tr>
</thead>
<tbody>
<tr>
<th>composer</th>
<td id="app_composer"></td>
2017-05-06 09:14:01 +00:00
</tr>
<tr>
2017-06-25 12:44:51 +00:00
<th>drupal-console</th>
<td id="app_drupalc"></td>
2017-05-06 09:14:01 +00:00
</tr>
<tr>
2018-11-01 09:19:43 +00:00
<th>drush7</th>
<td id="app_drush7"></td>
</tr>
<tr>
<th>drush8</th>
<td id="app_drush8"></td>
</tr>
<tr>
<th>drush9</th>
<td id="app_drush9"></td>
2017-05-06 09:14:01 +00:00
</tr>
<tr>
<th>git</th>
<td id="app_git"></td>
</tr>
2017-06-25 12:44:51 +00:00
<tr>
<th>Laravel installer</th>
<td id="app_laravel"></td>
2017-06-25 12:44:51 +00:00
</tr>
<tr>
<th>mysqldump-secure</th>
<td id="app_mds"></td>
2017-06-25 12:44:51 +00:00
</tr>
<tr>
<th>node</th>
<td id="app_node"></td>
2017-05-06 09:14:01 +00:00
</tr>
<tr>
<th>npm</th>
<td id="app_npm"></td>
2017-05-06 09:14:01 +00:00
</tr>
2017-06-25 12:44:51 +00:00
<tr>
<th>Phalcon devtools</th>
<td id="app_phalcon"></td>
2017-06-25 12:44:51 +00:00
</tr>
<tr>
<th>Symfony installer</th>
<td id="app_symfony"></td>
2017-06-25 12:44:51 +00:00
</tr>
<tr>
<th>Wordpress cli</th>
<td id="app_wpcli"></td>
2017-06-25 12:44:51 +00:00
</tr>
2017-05-06 09:14:01 +00:00
</tbody>
</table>
2016-10-09 16:47:49 +00:00
2017-05-06 09:14:01 +00:00
</div>
</div>
2016-10-22 14:39:08 +00:00
</div>
2017-05-06 09:14:01 +00:00
<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12 offset-lg-4 offset-md-0 offset-sm-0 col-margin">
<div class="dash-box">
<div class="dash-box-head"><i class="fa fa-info-circle" aria-hidden="true"></i> PHP Container Status</div>
<div class="dash-box-body">
<p><small>The PHP Docker can connect to the following services via the specified hostnames and IP addresses.</small></p>
<table class="table table-striped table-hover table-bordered table-sm font-small">
<thead class="thead-inverse">
<tr>
<th>Service</th>
<th>Hostname / IP</th>
</tr>
</thead>
<tbody>
<?php foreach ($connection as $name => $docker): ?>
<tr>
<th rowspan="<?php echo count($docker);?>" class="align-middle"><?php echo $name; ?> connect</th>
2017-05-06 09:14:01 +00:00
<?php $i=1; foreach ($docker as $conn): ?>
<?php if ($conn['succ']): ?>
2017-05-11 06:36:16 +00:00
<?php $text = '<span class="text-success dvlbox-ok"><i class="fa fa-check-square"></i></span> '.$conn['host']; ?>
2017-05-06 09:14:01 +00:00
<?php else: ?>
2017-05-11 06:36:16 +00:00
<?php $text = '<span class="text-danger dvlbox-err"><i class="fa fa-exclamation-triangle"></i></span> '.$conn['host'].'<br/>'.$conn['error']; ?>
2017-05-06 09:14:01 +00:00
<?php endif; ?>
<?php if ($i == 1): $i++;?>
<td>
<?php echo $text; ?>
</td>
</tr>
<?php else: $i++;?>
<tr>
<td>
<?php echo $text; ?>
</td>
</tr>
<?php endif; ?>
<?php endforeach; ?>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
2016-11-15 18:39:11 +00:00
</div>
2016-10-22 14:39:08 +00:00
2017-05-06 09:14:01 +00:00
</div><!-- /row -->
2016-10-22 14:39:08 +00:00
2016-10-09 16:47:49 +00:00
2017-05-06 09:14:01 +00:00
<!-- ############################################################ -->
<!-- TABLES -->
<!-- ############################################################ -->
<div class="row">
2017-04-23 11:20:32 +00:00
2017-05-06 09:14:01 +00:00
<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12 col-margin">
<div class="dash-box">
<div class="dash-box-head"><i class="fa fa-share-alt" aria-hidden="true"></i> Networking</div>
<div class="dash-box-body">
<div class="row">
<div class="container">
<table class="table table-striped table-hover table-bordered table-sm font-small">
<thead class="thead-inverse">
<tr>
<th>Docker</th>
<th>Hostname</th>
<th>IP</th>
</tr>
</thead>
<tbody>
<tr>
<th>php</th>
<td><?php echo $GLOBALS['PHP_HOST_NAME']; ?></td>
2017-05-15 06:56:17 +00:00
<td><?php echo loadClass('Php')->getIpAddress(); ?></td>
2017-05-06 09:14:01 +00:00
</tr>
<tr>
<th>httpd</th>
<td><?php echo $GLOBALS['HTTPD_HOST_NAME']; ?></td>
2017-05-15 06:56:17 +00:00
<td><?php echo loadClass('Httpd')->getIpAddress(); ?></td>
2017-05-06 09:14:01 +00:00
</tr>
<?php if ($avail_mysql): ?>
<tr>
<th>mysql</th>
<td><?php echo $GLOBALS['MYSQL_HOST_NAME']; ?></td>
2017-05-15 06:56:17 +00:00
<td><?php echo loadClass('Mysql')->getIpAddress(); ?></td>
2017-05-06 09:14:01 +00:00
</tr>
<?php endif; ?>
<?php if ($avail_pgsql): ?>
<tr>
<th>pgsql</th>
<td><?php echo $GLOBALS['PGSQL_HOST_NAME']; ?></td>
2017-05-15 06:56:17 +00:00
<td><?php echo loadClass('Pgsql')->getIpAddress(); ?></td>
2017-05-06 09:14:01 +00:00
</tr>
<?php endif; ?>
<?php if ($avail_redis): ?>
<tr>
<th>redis</th>
<td><?php echo $GLOBALS['REDIS_HOST_NAME']; ?></td>
2017-05-15 06:56:17 +00:00
<td><?php echo loadClass('Redis')->getIpAddress(); ?></td>
2017-05-06 09:14:01 +00:00
</tr>
<?php endif; ?>
<?php if ($avail_memcd): ?>
<tr>
<th>memcached</th>
<td><?php echo $GLOBALS['MEMCD_HOST_NAME']; ?></td>
2017-05-15 06:56:17 +00:00
<td><?php echo loadClass('Memcd')->getIpAddress(); ?></td>
2017-05-06 09:14:01 +00:00
</tr>
<?php endif; ?>
2017-05-22 21:20:20 +00:00
<?php if ($avail_mongo): ?>
<tr>
<th>mongo</th>
<td><?php echo $GLOBALS['MONGO_HOST_NAME']; ?></td>
<td><?php echo loadClass('Mongo')->getIpAddress(); ?></td>
</tr>
<?php endif; ?>
<?php if ($avail_dns): ?>
<tr>
<th>bind</th>
<td><?php echo $GLOBALS['DNS_HOST_NAME']; ?></td>
2017-05-15 06:56:17 +00:00
<td><?php echo loadClass('Dns')->getIpAddress(); ?></td>
</tr>
<?php endif; ?>
2017-05-06 09:14:01 +00:00
</tbody>
</table>
2017-04-23 11:20:32 +00:00
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12 offset-lg-4 offset-md-0 offset-sm-0 col-margin">
2017-05-06 09:14:01 +00:00
<div class="dash-box">
<div class="dash-box-head"><i class="fa fa-wrench" aria-hidden="true"></i> Ports</div>
<div class="dash-box-body">
<div class="row">
<div class="container">
<table class="table table-striped table-hover table-bordered table-sm font-small">
<thead class="thead-inverse">
<tr>
<th>Docker</th>
<th>Host port</th>
<th>Docker port</th>
</tr>
</thead>
<tbody>
<tr>
<th>php</th>
<td>-</td>
<td>9000</td>
</tr>
<tr>
<th>httpd</th>
2018-05-04 06:57:48 +00:00
<td>
<?php echo loadClass('Helper')->getEnv('LOCAL_LISTEN_ADDR').loadClass('Helper')->getEnv('HOST_PORT_HTTPD');?><br/>
<?php echo loadClass('Helper')->getEnv('LOCAL_LISTEN_ADDR').loadClass('Helper')->getEnv('HOST_PORT_HTTPD_SSL');?>
</td>
<td>80<br/>443</td>
2017-05-06 09:14:01 +00:00
</tr>
<?php if ($avail_mysql): ?>
<tr>
<th>mysql</th>
2017-05-15 06:56:17 +00:00
<td><?php echo loadClass('Helper')->getEnv('LOCAL_LISTEN_ADDR').loadClass('Helper')->getEnv('HOST_PORT_MYSQL');?></td>
2017-05-06 09:14:01 +00:00
<td>3306</td>
</tr>
<?php endif; ?>
<?php if ($avail_pgsql): ?>
<tr>
<th>pgsql</th>
2017-05-15 06:56:17 +00:00
<td><?php echo loadClass('Helper')->getEnv('LOCAL_LISTEN_ADDR').loadClass('Helper')->getEnv('HOST_PORT_PGSQL');?></td>
2017-05-06 09:14:01 +00:00
<td>5432</td>
</tr>
<?php endif; ?>
<?php if ($avail_redis): ?>
<tr>
<th>redis</th>
2017-05-15 06:56:17 +00:00
<td><?php echo loadClass('Helper')->getEnv('LOCAL_LISTEN_ADDR').loadClass('Helper')->getEnv('HOST_PORT_REDIS');?></td>
2017-05-06 09:14:01 +00:00
<td>6379</td>
</tr>
<?php endif; ?>
<?php if ($avail_memcd): ?>
<tr>
<th>memcached</th>
<td><?php echo loadClass('Helper')->getEnv('LOCAL_LISTEN_ADDR').loadClass('Helper')->getEnv('HOST_PORT_MEMCD');?></td>
2017-05-06 09:14:01 +00:00
<td>11211</td>
</tr>
<?php endif; ?>
2017-05-22 21:20:20 +00:00
<?php if ($avail_mongo): ?>
<tr>
<th>mongo</th>
<td><?php echo loadClass('Helper')->getEnv('LOCAL_LISTEN_ADDR').loadClass('Helper')->getEnv('HOST_PORT_MONGO');?></td>
<td>27017</td>
</tr>
<?php endif; ?>
<?php if ($avail_dns): ?>
<tr>
<th>bind</th>
<td>
2017-05-15 06:56:17 +00:00
<?php echo loadClass('Helper')->getEnv('LOCAL_LISTEN_ADDR').loadClass('Helper')->getEnv('HOST_PORT_BIND');?>/tcp<br/>
<?php echo loadClass('Helper')->getEnv('LOCAL_LISTEN_ADDR').loadClass('Helper')->getEnv('HOST_PORT_BIND');?>/udp
</td>
<td>53/tcp<br/>53/udp</td>
</tr>
<?php endif; ?>
2017-05-06 09:14:01 +00:00
</tbody>
</table>
</div>
</div>
</div>
</div>
2016-10-22 14:39:08 +00:00
</div>
2016-10-09 16:47:49 +00:00
2017-05-06 09:14:01 +00:00
<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12 col-margin">
<div class="dash-box">
<div class="dash-box-head"><i class="fa fa-hdd-o" aria-hidden="true"></i> Data mounts</div>
<div class="dash-box-body">
<div class="row">
<div class="container">
<table class="table table-striped table-hover table-bordered table-sm font-small" style="word-break: break-word;">
<thead class="thead-inverse">
<tr>
<th>Docker</th>
<th>Host path</th>
<th>Docker path</th>
</tr>
</thead>
<tbody>
<tr>
<th>php</th>
2017-05-15 06:56:17 +00:00
<td><?php echo loadClass('Helper')->getEnv('HOST_PATH_HTTPD_DATADIR'); ?></td>
2017-05-06 09:14:01 +00:00
<td>/shared/httpd</td>
</tr>
<tr>
<th>httpd</th>
2017-05-15 06:56:17 +00:00
<td><?php echo loadClass('Helper')->getEnv('HOST_PATH_HTTPD_DATADIR'); ?></td>
2017-05-06 09:14:01 +00:00
<td>/shared/httpd</td>
</tr>
<?php if ($avail_mysql): ?>
<tr>
<th>mysql</th>
2017-05-15 06:56:17 +00:00
<td><?php echo loadClass('Helper')->getEnv('HOST_PATH_MYSQL_DATADIR').'/'.loadClass('Helper')->getEnv('MYSQL_SERVER'); ?></td>
2017-05-06 09:14:01 +00:00
<td>/var/lib/mysql</td>
</tr>
<?php endif; ?>
<?php if ($avail_pgsql): ?>
<tr>
<th>pgsql</th>
2017-05-15 06:56:17 +00:00
<td><?php echo loadClass('Helper')->getEnv('HOST_PATH_PGSQL_DATADIR').'/'.loadClass('Helper')->getEnv('PGSQL_SERVER'); ?></td>
2017-05-06 09:14:01 +00:00
<td>/var/lib/postgresql/data/pgdata</td>
</tr>
<?php endif; ?>
<?php if ($avail_redis): ?>
<tr>
<th>redis</th>
<td>-</td>
<td>-</td>
</tr>
<?php endif; ?>
<?php if ($avail_memcd): ?>
<tr>
<th>memcached</th>
<td>-</td>
<td>-</td>
</tr>
<?php endif; ?>
2017-05-22 21:20:20 +00:00
<?php if ($avail_mongo): ?>
<tr>
<th>mongo</th>
<td><?php echo loadClass('Helper')->getEnv('HOST_PATH_MONGO_DATADIR'); ?></td>
<td>/data/db</td>
</tr>
<?php endif; ?>
<?php if ($avail_dns): ?>
<tr>
<th>bind</th>
<td>-</td>
<td>-</td>
</tr>
<?php endif; ?>
2017-05-06 09:14:01 +00:00
</tbody>
</table>
</div>
</div>
</div>
</div>
2016-10-22 14:39:08 +00:00
</div>
2016-10-09 16:47:49 +00:00
2017-05-06 09:14:01 +00:00
<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12 col-margin">
<div class="dash-box">
<div class="dash-box-head"><i class="fa fa-cogs" aria-hidden="true"></i> Config mounts</div>
<div class="dash-box-body">
<div class="row">
<div class="container">
<table class="table table-striped table-hover table-bordered table-sm font-small">
<thead class="thead-inverse">
<tr>
<th>Docker</th>
<th>Host path</th>
<th>Docker path</th>
</tr>
</thead>
<tbody>
<tr>
2018-04-14 08:54:09 +00:00
<th>php (ini)</th>
<td>./cfg/php-ini-<?php echo loadClass('Helper')->getEnv('PHP_SERVER'); ?></td>
2017-05-06 09:14:01 +00:00
<td>/etc/php-custom.d</td>
</tr>
2018-04-14 08:54:09 +00:00
<tr>
<th>php (fpm)</th>
<td>./cfg/php-fpm-<?php echo loadClass('Helper')->getEnv('PHP_SERVER'); ?></td>
<td>/etc/php-fpm-custom.d</td>
</tr>
2017-05-06 09:14:01 +00:00
<tr>
<th>httpd</th>
<td>./cfg/<?php echo loadClass('Helper')->getEnv('HTTPD_SERVER'); ?></td>
<td>/etc/httpd-custom.d</td>
2017-05-06 09:14:01 +00:00
</tr>
<?php if ($avail_mysql): ?>
<tr>
<th>mysql</th>
2017-05-15 06:56:17 +00:00
<td>./cfg/<?php echo loadClass('Helper')->getEnv('MYSQL_SERVER'); ?></td>
2017-05-06 09:14:01 +00:00
<td>/etc/mysql/conf.d</td>
</tr>
<?php endif; ?>
<?php if ($avail_pgsql): ?>
<tr>
<th>pgsql</th>
<td>-</td>
<td>-</td>
</tr>
<?php endif; ?>
<?php if ($avail_redis): ?>
<tr>
<th>redis</th>
<td>-</td>
<td>-</td>
</tr>
<?php endif; ?>
<?php if ($avail_memcd): ?>
<tr>
<th>memcached</th>
<td>-</td>
<td>-</td>
</tr>
<?php endif; ?>
2017-05-22 21:20:20 +00:00
<?php if ($avail_mongo): ?>
<tr>
<th>mongo</th>
<td>-</td>
<td>-</td>
</tr>
<?php endif; ?>
<?php if ($avail_dns): ?>
<tr>
<th>bind</th>
<td>-</td>
<td>-</td>
</tr>
<?php endif; ?>
2017-05-06 09:14:01 +00:00
</tbody>
</table>
</div>
</div>
</div>
</div>
2016-11-15 18:39:11 +00:00
</div>
2017-05-06 09:14:01 +00:00
<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12 col-margin">
<div class="dash-box">
<div class="dash-box-head"><i class="fa fa-bar-chart" aria-hidden="true"></i> Log mounts</div>
<div class="dash-box-body">
<div class="row">
<div class="container">
<table class="table table-striped table-hover table-bordered table-sm font-small" style="word-break: break-word;">
<thead class="thead-inverse">
<tr>
<th>Docker</th>
<th>Host path</th>
<th>Docker path</th>
</tr>
</thead>
<tbody>
<tr>
<th>php</th>
2018-03-05 21:48:48 +00:00
<td>./log/php-fpm-<?php echo loadClass('Helper')->getEnv('PHP_SERVER'); ?></td>
2017-05-06 09:14:01 +00:00
<td>/var/log/php</td>
</tr>
<tr>
<th>httpd</th>
2017-05-15 06:56:17 +00:00
<td>./log/<?php echo loadClass('Helper')->getEnv('HTTPD_SERVER'); ?></td>
<td>/var/log/<?php echo loadClass('Helper')->getEnv('HTTPD_SERVER'); ?></td>
2017-05-06 09:14:01 +00:00
</tr>
<?php if ($avail_mysql): ?>
<tr>
<th>mysql</th>
2017-05-15 06:56:17 +00:00
<td>./log/<?php echo loadClass('Helper')->getEnv('MYSQL_SERVER'); ?></td>
2017-05-06 09:14:01 +00:00
<td>/var/log/mysql</td>
</tr>
<?php endif; ?>
<?php if ($avail_pgsql): ?>
<tr>
<th>pgsql</th>
2017-05-15 06:56:17 +00:00
<td>./log/pgsql-<?php echo loadClass('Helper')->getEnv('PGSQL_SERVER'); ?></td>
2017-05-06 09:14:01 +00:00
<td>/var/log/postgresql</td>
</tr>
<?php endif; ?>
<?php if ($avail_redis): ?>
<tr>
<th>redis</th>
2017-05-15 06:56:17 +00:00
<td>./log/redis-<?php echo loadClass('Helper')->getEnv('REDIS_SERVER'); ?></td>
2017-05-06 09:14:01 +00:00
<td>/var/log/redis</td>
</tr>
<?php endif; ?>
<?php if ($avail_memcd): ?>
<tr>
<th>memcached</th>
<td>./log/memcached-<?php echo loadClass('Helper')->getEnv('MEMCD_SERVER'); ?></td>
2017-05-06 09:14:01 +00:00
<td>/var/log/memcached</td>
</tr>
<?php endif; ?>
2017-05-22 21:20:20 +00:00
<?php if ($avail_mongo): ?>
<tr>
<th>mongo</th>
<td>-</td>
<td>-</td>
</tr>
<?php endif; ?>
<?php if ($avail_dns): ?>
<tr>
<th>bind</th>
<td>-</td>
<td>-</td>
</tr>
<?php endif; ?>
2017-05-06 09:14:01 +00:00
</tbody>
</table>
</div>
</div>
</div>
2017-04-23 11:20:32 +00:00
</div>
2017-04-23 12:08:54 +00:00
</div>
2017-04-23 11:20:32 +00:00
2017-05-06 09:14:01 +00:00
</div><!-- /row -->
2017-04-23 11:20:32 +00:00
2016-10-09 16:47:49 +00:00
</div><!-- /.container -->
2017-05-15 06:56:17 +00:00
<?php echo loadClass('Html')->getFooter(); ?>
<script>
// self executing function here
(function() {
// your page initialization code here
// the DOM will be available here
/**
* Update installed tool versions.
* Ajax method is faster for loading the front page
* @param string app Name of the tool
*/
function updateVersions(app) {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
var elem = document.getElementById('app_'+app);
if (this.readyState == 4 && this.status == 200) {
json = JSON.parse(this.responseText);
elem.innerHTML = json[app];
}
};
xhttp.open('GET', '_ajax_callback.php?software='+app, true);
xhttp.send();
}
updateVersions('composer');
updateVersions('drupalc');
2018-11-01 09:19:43 +00:00
updateVersions('drush7');
updateVersions('drush8');
updateVersions('drush9');
updateVersions('git');
updateVersions('laravel');
updateVersions('mds');
updateVersions('node');
updateVersions('npm');
updateVersions('phalcon');
updateVersions('symfony');
updateVersions('wpcli');
})();
</script>
2016-10-09 16:47:49 +00:00
</body>
</html>