Intranet: show custom Httpd configuration files

This commit is contained in:
cytopia 2020-11-22 11:54:56 +01:00
parent fda37efc64
commit df6ee3fb36
No known key found for this signature in database
GPG Key ID: 6D56EDB8695128A2
3 changed files with 67 additions and 0 deletions

View File

@ -0,0 +1,62 @@
<?php require '../config.php'; ?>
<?php loadClass('Helper')->authPage(); ?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php echo loadClass('Html')->getHead(); ?>
</head>
<body>
<?php echo loadClass('Html')->getNavbar(); ?>
<div class="container">
<h1>Httpd custom configs</h1>
<br/>
<br/>
<p>Shows your currently custom configuration files applied to the Httpd container.</p>
<div class="row">
<div class="col-md-12">
<?php $vHosts = loadClass('Httpd')->getVirtualHosts(); ?>
<?php $custom = false; ?>
<?php foreach ($vHosts as $vHost): ?>
<?php if (($vhostGen = loadClass('Httpd')->getVhostgenTemplatePath($vHost['name'])) !== false): ?>
<?php $custom = true; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php if ($custom): ?>
<table class="table table-striped">
<thead class="thead-inverse">
<tr>
<th>Project</th>
<th>Host</th>
<th>Container</th>
<th>Files</th>
</tr>
</thead>
<tbody>
<?php foreach ($vHosts as $vHost): ?>
<?php if (($vhostGen = loadClass('Httpd')->getVhostgenTemplatePath($vHost['name'])) !== false): ?>
<tr>
<th><?php echo $vHost['domain']; ?></th>
<td><?php echo loadClass('Helper')->getEnv('HOST_PATH_HTTPD_DATADIR').'/'.$vHost['name'].'/'.loadClass('Helper')->getEnv('HTTPD_TEMPLATE_DIR');?></td>
<td><?php echo dirname($vhostGen); ?></td>
<td><code><?php echo basename($vhostGen); ?></code></td>
</tr>
<?php endif; ?>
<?php endforeach; ?>
</tbody>
</table>
<?php else: ?>
<p>No custom configurations applied.</p>
<?php endif; ?>
</div>
</div>
</div><!-- /.container -->
<?php echo loadClass('Html')->getFooter(); ?>
</body>
</html>

View File

@ -30,6 +30,10 @@ class Html
'name' => 'PHP', 'name' => 'PHP',
'path' => '/config_php.php' 'path' => '/config_php.php'
), ),
array(
'name' => 'Httpd',
'path' => '/config_httpd.php'
),
), ),
), ),
array( array(

View File

@ -20,6 +20,7 @@ major versions.
- [#692](https://github.com/cytopia/devilbox/issues/692) Added custom supervisor configs - [#692](https://github.com/cytopia/devilbox/issues/692) Added custom supervisor configs
- Added project and customization checks in check-config.sh - Added project and customization checks in check-config.sh
- Intranet: show custom PHP configuration files - Intranet: show custom PHP configuration files
- Intranet: show custom Httpd configuration files
## Release v1.8.2 (2020-11-14) ## Release v1.8.2 (2020-11-14)