Initial Work for supporting DAPNET/POCSAG in Dashboard

Service Buttons added, also for DMRGateway as this is now mandatory for MMDVMHost.
This commit is contained in:
Kim Hübel 2020-09-21 14:13:41 +01:00
parent 4b02cb3ffe
commit 0f44b9a196
6 changed files with 18 additions and 100 deletions

View file

@ -218,6 +218,17 @@ function showMode($mode, $mmdvmconfigs) {
echo "badge-default\" title=\""._("Remote gateway configured - not checked!");
}
break;
case "POCSAG Network":
if (getConfigItem("POCSAG Network", "GatewayAddress", $mmdvmconfigs) == "localhost" || getConfigItem("POCSAG Network", "GatewayAddress", $mmdvmconfigs) == "127.0.0.1") {
if (isProcessRunning("DAPNETGateway")) {
echo "badge-success";
} else {
echo "badge-danger\" title=\""._("Gateway is down!");
}
} else {
echo "badge-default\" title=\""._("Remote gateway configured - not checked!");
}
break;
default:
if (isProcessRunning("MMDVMHost")) {
echo "badge-success";

View file

@ -16,6 +16,8 @@
<?php showMode("P25 Network", $mmdvmconfigs);?>
<?php showMode("NXDN", $mmdvmconfigs);?>
<?php showMode("NXDN Network", $mmdvmconfigs);?>
<?php showMode("POCSAG", $mmdvmconfigs);?>
<?php showMode("POCSAG Network", $mmdvmconfigs);?>
</tr>
</table>
</div>

View file

@ -1,95 +0,0 @@
<?php
?>
<div class="panel panel-default">
<!-- Standard-Panel-Inhalt -->
<div class="panel-heading"><?php echo _("YSFGateway-Infos"); ?><span class="pull-right clickable"><i class="glyphicon glyphicon-chevron-up"></i></span></div>
<div class="panel-body">
<!-- Tabelle -->
<table class="table">
<tr>
<td><span class="badge <?php
if (isProcessRunning("YSFGateway")) {
echo "badge-success";
?>"><?php echo _("YSFGateway Process is running"); ?></span></td><?php
} else {
echo "badge-danger\" title=\"YSFGateway is down!";
?>"><?php echo _("YSFGateway Process is down!"); ?></span></td><?php
}
?>
</tr>
</table>
</div>
</div>
<div class="panel panel-default">
<!-- Standard-Panel-Inhalt -->
<div class="panel-heading"><?php echo _("YSFReflectors reported active"); ?><span class="pull-right clickable"><i class="glyphicon glyphicon-chevron-up"></i></span></div>
<div class="panel-body">
<!-- Tabelle -->
<div class="table-responsive">
<table id="ysfGateways" class="table ysfGateways table-condensed table-striped table-hover">
<?php
if (count($activeYSFReflectors) > 0) {
?>
<thead>
<tr>
<th><?php echo _("No."); ?></th>
<th><?php echo _("Name"); ?></th>
<th><?php echo _("Description"); ?></th>
<th><?php echo _("ID"); ?></th>
<th><?php echo _("Connections"); ?></th>
</tr>
</thead>
<tbody>
<?php
$counter = 1;
foreach ($activeYSFReflectors as $reflector) {
echo "<tr>";
echo "<td>$counter</td>";
for ($i = 0; $i < 5; $i++) {
if ($i == 0 && defined("ENABLEYSFREFLECTORSWITCHING")) {
echo"<td><a href=\"scripts/switchysfreflector.php?reflector=$reflector[$i]\" title=\"Click to connect to\">$reflector[$i]</a>";
$i++;
if ($reflector[$i] !=="") {
if (startsWith($reflector[$i],"http"))
echo ' <a target="_new" href="'.$reflector[$i].'"><img src="images/dashboard.png" /></a>';
else
echo ' <a target="_new" href="http://'.$reflector[$i].'"><img src="images/dashboard.png" /></a>';
}
echo"</td>";
} else {
if ($i == 0) {
echo"<td>$reflector[$i]";
$i++;
if ($reflector[$i] !=="") {
if (startsWith($reflector[$i],"http"))
echo ' <a target="_new" href="'.$reflector[$i].'"><img src="images/dashboard.png" /></a>';
else
echo ' <a target="_new" href="http://'.$reflector[$i].'"><img src="images/dashboard.png" /></a>';
}
echo"</td>";
} else {
echo"<td>$reflector[$i]</td>";
}
}
}
echo "</tr>\n";
$counter++;
}
}
?>
<tbody>
</table>
</div>
</div>
</div>
<script>
$(document).ready(function(){
var ysfGatewaysT = $('#ysfGateways').dataTable( {
"language": <?php echo DATATABLESTRANSLATION; ?>,
"aaSorting": [[0,'asc']]
} );
});
</script>

View file

@ -218,9 +218,9 @@ if (defined("SHOWLOCALTX")) {
include "include/localtx_ajax.php";
showLapTime("localtx_ajax");
}
if (defined("ENABLEYSFGATEWAY")) {
include "include/ysfgatewayinfo.php";
showLapTime("ysfgatewayinfo");
if (defined("ENABLEYSFGATEWAY")|| defined("ENABLEDMRGATEWAY")) {
include "include/gatewayinfo.php";
showLapTime("gatewayinfo");
}
?>
<div class="panel panel-info">

View file

@ -115,7 +115,7 @@ include "include/tools.php";
<h2><?php echo _("YSFGateway-Configuration"); ?></h2>
<div class="input-group">
<span class="input-group-addon" id="ENABLEYSFGATEWAY" style="width: 300px"><?php echo _("Enable YSFGateway"); ?></span>
<div class="panel-body"><input type="checkbox" name="ENABLEYSFGATEWAY" <?php if (defined("ENABLEYSFGATEWAY")) echo "checked" ?>></div>
<div class="panel-body"><input type="checkbox" name="ENABLEGATEWAY" <?php if (defined("ENABLEYSFGATEWAY")) echo "checked" ?>></div>
</div>
<div class="input-group">
<span class="input-group-addon" id="YSFGATEWAYLOGPATH" style="width: 300px"><?php echo _("Path to YSFGateway-logfile"); ?></span>

View file

@ -1,3 +1,3 @@
<?php
define("VERSION", "20200605-1 (".getGitVersion().")");
define("VERSION", "20200921-1 (".getGitVersion().")");
?>