[Web] Do not show Solr and Clam status when disabled, thanks to Tina
parent
274c05f5bf
commit
e76beebebb
|
@ -4,12 +4,8 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/prerequisites.inc.php';
|
||||||
if (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == "admin") {
|
if (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == "admin") {
|
||||||
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/header.inc.php';
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/header.inc.php';
|
||||||
$_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
$_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
||||||
if (strtolower(getenv('SKIP_SOLR')) == 'n') {
|
$solr_status = (preg_match("/^([yY][eE][sS]|[yY])+$/", $_ENV["SKIP_SOLR"]) === false) ? solr_status() : false;
|
||||||
$solr_status = solr_status();
|
$clamd_status = (preg_match("/^([yY][eE][sS]|[yY])+$/", $_ENV["SKIP_CLAMD"]) === false) ? true : false;
|
||||||
}
|
|
||||||
else {
|
|
||||||
$solr_status = false;
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
|
@ -107,6 +103,8 @@ else {
|
||||||
<?php
|
<?php
|
||||||
$containers = (docker('info'));
|
$containers = (docker('info'));
|
||||||
foreach ($containers as $container => $container_info) {
|
foreach ($containers as $container => $container_info) {
|
||||||
|
if ($container == 'clamd-mailcow' && $clamd_status === false) { continue; }
|
||||||
|
if ($container == 'solr-mailcow' && $solr_status === false) { continue; }
|
||||||
?>
|
?>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<?=$container . ' (' . $container_info['Config']['Image'] . ')';?>
|
<?=$container . ' (' . $container_info['Config']['Image'] . ')';?>
|
||||||
|
|
Loading…
Reference in New Issue