reworked mode info, added YSFGateway-detection, detect YSF and D-STAR only, when configured to connect locally

This commit is contained in:
dg9vh 2016-09-01 18:22:00 +00:00
parent 244539f0ee
commit 1e2ded406a
2 changed files with 25 additions and 10 deletions

View file

@ -72,20 +72,35 @@ function showMode($mode, $mmdvmconfigs) {
?> ?>
<td><span class="label <?php <td><span class="label <?php
if (getEnabled($mode, $mmdvmconfigs) == 1) { if (getEnabled($mode, $mmdvmconfigs) == 1) {
if ($mode == "D-Star Network") { switch ($mode) {
if (isProcessRunning(IRCDDBGATEWAY)) { case "D-Star Network":
echo "label-success"; if (getConfigItem("D-Star Network", "GatewayAddress", $mmdvmconfigs) == "localhost" || getConfigItem("D-Star Network", "GatewayAddress", $mmdvmconfigs) == "127.0.0.1") {
} else { if (isProcessRunning(IRCDDBGATEWAY)) {
echo "label-danger\" title=\"ircddbgateway is down!"; echo "label-success";
} } else {
} else { echo "label-danger\" title=\"ircddbgateway is down!";
if ($mode == "D-Star" || $mode =="DMR" || $mode =="DMR Network" || $mode =="System Fusion" || $mode =="System Fusion Network") { }
} else {
echo "label-default\" title=\"Remote gateway configured - not checked!";
}
break;
case "System Fusion Network":
if (getConfigItem("System Fusion Network", "GwyAddress", $mmdvmconfigs) == "localhost" || getConfigItem("System Fusion Network", "GwyAddress", $mmdvmconfigs) == "127.0.0.1") {
if (isProcessRunning("YSFGateway")) {
echo "label-success";
} else {
echo "label-danger\" title=\"YSFGateway is down!";
}
} else {
echo "label-default\" title=\"Remote gateway configured - not checked!";
}
break;
default:
if (isProcessRunning("MMDVMHost")) { if (isProcessRunning("MMDVMHost")) {
echo "label-success"; echo "label-success";
} else { } else {
echo "label-danger\" title=\"MMDVMHost is down!"; echo "label-danger\" title=\"MMDVMHost is down!";
} }
}
} }
} else { } else {
echo "label-default"; echo "label-default";

View file

@ -1,3 +1,3 @@
<?php <?php
define("VERSION", "20160828-1"); define("VERSION", "20160901-1");
?> ?>