Compare commits
11 commits
0df1d9bd34
...
28cef528fe
Author | SHA1 | Date | |
---|---|---|---|
|
28cef528fe | ||
|
daad73179f | ||
|
1a7eccf1bb | ||
|
185ee5bf56 | ||
|
34210147a7 | ||
|
2e367cbbd8 | ||
|
35c2980280 | ||
|
62b6fbdb79 | ||
|
451553b874 | ||
|
39bf202eac | ||
|
4760a25f34 |
11 changed files with 259 additions and 87 deletions
|
@ -1,7 +1,12 @@
|
|||
# MMDVMHost-Dashboard
|
||||
|
||||
_No further development and support!_
|
||||
|
||||
Dashboard for MMDVMHost (by G4KLX)
|
||||
==================================
|
||||
|
||||
THIS CODE IS NO LONGER UNDER DEVELOPMENT!!!
|
||||
|
||||
About
|
||||
=====
|
||||
MMDVMHost-Dashboard is a web-dashboard for visualization of different data like
|
||||
|
|
30
ajax.php
30
ajax.php
|
@ -30,6 +30,14 @@ $logLinesMMDVM = getMMDVMLog();
|
|||
$reverseLogLinesMMDVM = $logLinesMMDVM;
|
||||
rsort($reverseLogLinesMMDVM);
|
||||
|
||||
if (defined("ENABLEDAPNETGATEWAY")) {
|
||||
$logLinesDAPNETGateway = getDAPNETGatewayLog();
|
||||
showLapTime("getDAPNETGatewayLog");
|
||||
$reverseLogLinesDAPNETGateway = $logLinesDAPNETGateway;
|
||||
rsort($reverseLogLinesDAPNETGateway);
|
||||
showLapTime("array_multisort");
|
||||
}
|
||||
|
||||
if ($_GET['section'] == "mode") {
|
||||
$mode = getActualMode(getLastHeard($reverseLogLinesMMDVM, TRUE), $mmdvmconfigs);
|
||||
echo $mode;
|
||||
|
@ -79,6 +87,17 @@ if ($_GET['section'] == "lastHeard") {
|
|||
}
|
||||
echo '{"data": '.json_encode($lastHeard)."}";
|
||||
}
|
||||
|
||||
if ($_GET['section'] == "DAPNETTx") {
|
||||
$DAPNETTxList = getDAPNETTxList($reverseLogLinesDAPNETGateway);
|
||||
$DAPNETTx = Array();
|
||||
for ($i = 0; $i < count($DAPNETTxList); $i++) {
|
||||
$listElem = $DAPNETTxList[$i];
|
||||
array_push($DAPNETTx, $listElem);
|
||||
}
|
||||
echo '{"data": '.json_encode($DAPNETTx)."}";
|
||||
}
|
||||
|
||||
if ($_GET['section'] == "localTx") {
|
||||
$localTXList = getHeardList($reverseLogLinesMMDVM, FALSE);
|
||||
$lastHeard = Array();
|
||||
|
@ -91,8 +110,9 @@ if ($_GET['section'] == "localTx") {
|
|||
$call_canon = substr($call_canon, 0, strpos($call_canon, "-"));
|
||||
}
|
||||
if (defined("ENABLEXTDLOOKUP")) {
|
||||
$listElem[11] ="";
|
||||
if ($listElem[6] == "RF" && ($listElem[1]=="D-Star" || startsWith($listElem[1], "DMR") || $listElem[1]=="YSF" || $listElem[1]=="P25" || $listElem[1]=="NXDN")) {
|
||||
//$listElem[11] ="";
|
||||
if (getEnabled("D-Star", $mmdvmconfigs) == 1 && $listElem[6] == "RF" && ($listElem[1]=="D-Star" || startsWith($listElem[1], "DMR") || $listElem[1]=="YSF" || $listElem[1]=="P25" || $listElem[1]=="NXDN") || \
|
||||
getEnabled("D-Star", $mmdvmconfigs) == 0 && $listElem[5] == "RF" && ($listElem[1]=="D-Star" || startsWith($listElem[1], "DMR") || $listElem[1]=="YSF" || $listElem[1]=="P25" || $listElem[1]=="NXDN")) {
|
||||
$listElem[3] = getName($call_canon);
|
||||
if ($listElem[2] !== "??????????") {
|
||||
if (!is_numeric($listElem[2])) {
|
||||
|
@ -106,10 +126,12 @@ if ($_GET['section'] == "localTx") {
|
|||
}
|
||||
}
|
||||
array_push($lastHeard, $listElem);
|
||||
$oldListElem = $listElem;
|
||||
}
|
||||
} else {
|
||||
$listElem[10] ="";
|
||||
if ($listElem[5] == "RF" && ($listElem[1]=="D-Star" || startsWith($listElem[1], "DMR") || $listElem[1]=="YSF" || $listElem[1]=="P25" || $listElem[1]=="NXDN")) {
|
||||
//$listElem[10] ="";
|
||||
if (getEnabled("D-Star", $mmdvmconfigs) == 1 && $listElem[5] == "RF" && ($listElem[1]=="D-Star" || startsWith($listElem[1], "DMR") || $listElem[1]=="YSF" || $listElem[1]=="P25" || $listElem[1]=="NXDN") || \
|
||||
getEnabled("D-Star", $mmdvmconfigs) == 0 && $listElem[4] == "RF" && ($listElem[1]=="D-Star" || startsWith($listElem[1], "DMR") || $listElem[1]=="YSF" || $listElem[1]=="P25" || $listElem[1]=="NXDN")) {
|
||||
if ($listElem[2] !== "??????????") {
|
||||
if (!is_numeric($listElem[2])) {
|
||||
if (defined("SHOWQRZ")) {
|
||||
|
|
|
@ -246,7 +246,8 @@ function showMode($mode, $mmdvmconfigs) {
|
|||
function getMMDVMLog() {
|
||||
// Open Logfile and copy loglines into LogLines-Array()
|
||||
$logPath = MMDVMLOGPATH."/".MMDVMLOGPREFIX."-".date("Y-m-d").".log";
|
||||
$logLines = explode("\n", `egrep -h "from|end|watchdog|lost" $logPath`);
|
||||
//$logLines = explode("\n", `egrep -h "from|end|watchdog|lost|POCSAG" $logPath`);
|
||||
$logLines = explode("\n", `egrep -h "from|end|watchdog|lost|POCSAG" $logPath`);
|
||||
return $logLines;
|
||||
}
|
||||
|
||||
|
@ -264,6 +265,13 @@ function getYSFGatewayLog() {
|
|||
return $logLines;
|
||||
}
|
||||
|
||||
function getDAPNETGatewayLog() {
|
||||
// Open Logfile and copy loglines into LogLines-Array()
|
||||
$logPath = DAPNETGATEWAYLOGPATH."/".DAPNETGATEWAYLOGPREFIX."-".date("Y-m-d").".log";
|
||||
$logLines = explode("\n", `egrep -h "Sending" $logPath`);
|
||||
return $logLines;
|
||||
}
|
||||
|
||||
// 00000000001111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000111111111122
|
||||
// 01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901
|
||||
// M: 2016-04-29 00:15:00.013 D-Star, received network header from DG9VH /ZEIT to CQCQCQ via DCS002 S
|
||||
|
@ -380,65 +388,65 @@ function getHeardList($logLines, $onlyLast) {
|
|||
$rssi = $rssiVal;
|
||||
}
|
||||
}
|
||||
$ber = substr($loss, 5);
|
||||
$loss = "";
|
||||
} else if (startsWith($loss,"RSSI:")) { //for short RF packets and "X" button requests, BER sometimes in not showed. RSSI is in BER position
|
||||
$loss="";
|
||||
$ber = "";
|
||||
$rssiString = substr($lineTokens[3], 6);
|
||||
if (constant("RSSI") == "min") $rssiVal = preg_replace('/(-\d+)\/-\d+\/-\d+ dBm/', "\\1", $rssiString);
|
||||
else if (constant("RSSI") == "max") $rssiVal = preg_replace('/-\d+\/(-\d+)\/-\d+ dBm/', "\\1", $rssiString);
|
||||
else if (constant("RSSI") == "avg") $rssiVal = preg_replace('/-\d+\/-\d+\/(-\d+) dBm/', "\\1", $rssiString);
|
||||
else if (constant("RSSI") == "all") $rssiVal = $rssiString;
|
||||
else $rssiVal = preg_replace('/-\d+\/-\d+\/(-\d+) dBm/', "\\1", $rssiString);
|
||||
if (constant("RSSI") != "all") {
|
||||
if ($rssiVal > "-53") $rssi = "<img src=\"images/4.png\" \> <div class=\"tooltip2\">S9<sup> +40dB</sup> ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-63") $rssi = "<img src=\"images/4.png\" \> <div class=\"tooltip2\">S9<sup> +30dB</sup> ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-73") $rssi = "<img src=\"images/4.png\" \> <div class=\"tooltip2\">S9<sup> +20dB</sup> ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-83") $rssi = "<img src=\"images/4.png\" \> <div class=\"tooltip2\">S9<sup> +10dB</sup> ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-93") $rssi = "<img src=\"images/4.png\" \> <div class=\"tooltip2\">S9 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-99") $rssi = "<img src=\"images/3.png\" \> <div class=\"tooltip2\">S8 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-105") $rssi = "<img src=\"images/3.png\" \> <div class=\"tooltip2\">S7 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-111") $rssi = "<img src=\"images/2.png\" \> <div class=\"tooltip2\">S6 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-117") $rssi = "<img src=\"images/2.png\" \> <div class=\"tooltip2\">S5 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-123") $rssi = "<img src=\"images/1.png\" \> <div class=\"tooltip2\">S4 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-129") $rssi = "<img src=\"images/1.png\" \> <div class=\"tooltip2\">S3 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-135") $rssi = "<img src=\"images/0.png\" \> <div class=\"tooltip2\">S2 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-141") $rssi = "<img src=\"images/0.png\" \> <div class=\"tooltip2\">S1 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
} else {
|
||||
$rssi = $rssiVal;
|
||||
}
|
||||
} else {
|
||||
$loss = strtok($loss, " ");
|
||||
if (array_key_exists(4,$lineTokens)) {
|
||||
$ber = substr($lineTokens[4], 5);
|
||||
}
|
||||
if (array_key_exists(5,$lineTokens) && substr($lineTokens[5], 6) != "-0/-0/-0 dBm") {
|
||||
$rssiString = substr($lineTokens[5], 6);
|
||||
if (constant("RSSI") == "min") $rssiVal = preg_replace('/(-\d+)\/-\d+\/-\d+ dBm/', "\\1", $rssiString);
|
||||
else if (constant("RSSI") == "max") $rssiVal = preg_replace('/-\d+\/(-\d+)\/-\d+ dBm/', "\\1", $rssiString);
|
||||
else if (constant("RSSI") == "avg") $rssiVal = preg_replace('/-\d+\/-\d+\/(-\d+) dBm/', "\\1", $rssiString);
|
||||
else if (constant("RSSI") == "all") $rssiVal = $rssiString;
|
||||
else $rssiVal = preg_replace('/-\d+\/-\d+\/(-\d+) dBm/', "\\1", $rssiString);
|
||||
if (constant("RSSI") != "all") {
|
||||
if ($rssiVal > "-53") $rssi = "<img src=\"images/4.png\" \> <div class=\"tooltip2\">S9<sup> +40dB</sup> ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-63") $rssi = "<img src=\"images/4.png\" \> <div class=\"tooltip2\">S9<sup> +30dB</sup> ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-73") $rssi = "<img src=\"images/4.png\" \> <div class=\"tooltip2\">S9<sup> +20dB</sup> ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-83") $rssi = "<img src=\"images/4.png\" \> <div class=\"tooltip2\">S9<sup> +10dB</sup> ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-93") $rssi = "<img src=\"images/4.png\" \> <div class=\"tooltip2\">S9 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-99") $rssi = "<img src=\"images/3.png\" \> <div class=\"tooltip2\">S8 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-105") $rssi = "<img src=\"images/3.png\" \> <div class=\"tooltip2\">S7 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-111") $rssi = "<img src=\"images/2.png\" \> <div class=\"tooltip2\">S6 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-117") $rssi = "<img src=\"images/2.png\" \> <div class=\"tooltip2\">S5 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-123") $rssi = "<img src=\"images/1.png\" \> <div class=\"tooltip2\">S4 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-129") $rssi = "<img src=\"images/1.png\" \> <div class=\"tooltip2\">S3 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-135") $rssi = "<img src=\"images/0.png\" \> <div class=\"tooltip2\">S2 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-141") $rssi = "<img src=\"images/0.png\" \> <div class=\"tooltip2\">S1 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
} else {
|
||||
$rssi = $rssiVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
$ber = substr($loss, 5);
|
||||
$loss = "";
|
||||
} else if (startsWith($loss,"RSSI:")) { //for short RF packets and "X" button requests, BER sometimes in not showed. RSSI is in BER position
|
||||
$loss="";
|
||||
$ber = "";
|
||||
$rssiString = substr($lineTokens[3], 6);
|
||||
if (constant("RSSI") == "min") $rssiVal = preg_replace('/(-\d+)\/-\d+\/-\d+ dBm/', "\\1", $rssiString);
|
||||
else if (constant("RSSI") == "max") $rssiVal = preg_replace('/-\d+\/(-\d+)\/-\d+ dBm/', "\\1", $rssiString);
|
||||
else if (constant("RSSI") == "avg") $rssiVal = preg_replace('/-\d+\/-\d+\/(-\d+) dBm/', "\\1", $rssiString);
|
||||
else if (constant("RSSI") == "all") $rssiVal = $rssiString;
|
||||
else $rssiVal = preg_replace('/-\d+\/-\d+\/(-\d+) dBm/', "\\1", $rssiString);
|
||||
if (constant("RSSI") != "all") {
|
||||
if ($rssiVal > "-53") $rssi = "<img src=\"images/4.png\" \> <div class=\"tooltip2\">S9<sup> +40dB</sup> ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-63") $rssi = "<img src=\"images/4.png\" \> <div class=\"tooltip2\">S9<sup> +30dB</sup> ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-73") $rssi = "<img src=\"images/4.png\" \> <div class=\"tooltip2\">S9<sup> +20dB</sup> ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-83") $rssi = "<img src=\"images/4.png\" \> <div class=\"tooltip2\">S9<sup> +10dB</sup> ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-93") $rssi = "<img src=\"images/4.png\" \> <div class=\"tooltip2\">S9 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-99") $rssi = "<img src=\"images/3.png\" \> <div class=\"tooltip2\">S8 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-105") $rssi = "<img src=\"images/3.png\" \> <div class=\"tooltip2\">S7 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-111") $rssi = "<img src=\"images/2.png\" \> <div class=\"tooltip2\">S6 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-117") $rssi = "<img src=\"images/2.png\" \> <div class=\"tooltip2\">S5 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-123") $rssi = "<img src=\"images/1.png\" \> <div class=\"tooltip2\">S4 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-129") $rssi = "<img src=\"images/1.png\" \> <div class=\"tooltip2\">S3 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-135") $rssi = "<img src=\"images/0.png\" \> <div class=\"tooltip2\">S2 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-141") $rssi = "<img src=\"images/0.png\" \> <div class=\"tooltip2\">S1 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
} else {
|
||||
$rssi = $rssiVal;
|
||||
}
|
||||
} else {
|
||||
$loss = strtok($loss, " ");
|
||||
if (array_key_exists(4,$lineTokens)) {
|
||||
$ber = substr($lineTokens[4], 5);
|
||||
}
|
||||
if (array_key_exists(5,$lineTokens) && substr($lineTokens[5], 6) != "-0/-0/-0 dBm") {
|
||||
$rssiString = substr($lineTokens[5], 6);
|
||||
if (constant("RSSI") == "min") $rssiVal = preg_replace('/(-\d+)\/-\d+\/-\d+ dBm/', "\\1", $rssiString);
|
||||
else if (constant("RSSI") == "max") $rssiVal = preg_replace('/-\d+\/(-\d+)\/-\d+ dBm/', "\\1", $rssiString);
|
||||
else if (constant("RSSI") == "avg") $rssiVal = preg_replace('/-\d+\/-\d+\/(-\d+) dBm/', "\\1", $rssiString);
|
||||
else if (constant("RSSI") == "all") $rssiVal = $rssiString;
|
||||
else $rssiVal = preg_replace('/-\d+\/-\d+\/(-\d+) dBm/', "\\1", $rssiString);
|
||||
if (constant("RSSI") != "all") {
|
||||
if ($rssiVal > "-53") $rssi = "<img src=\"images/4.png\" \> <div class=\"tooltip2\">S9<sup> +40dB</sup> ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-63") $rssi = "<img src=\"images/4.png\" \> <div class=\"tooltip2\">S9<sup> +30dB</sup> ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-73") $rssi = "<img src=\"images/4.png\" \> <div class=\"tooltip2\">S9<sup> +20dB</sup> ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-83") $rssi = "<img src=\"images/4.png\" \> <div class=\"tooltip2\">S9<sup> +10dB</sup> ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-93") $rssi = "<img src=\"images/4.png\" \> <div class=\"tooltip2\">S9 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-99") $rssi = "<img src=\"images/3.png\" \> <div class=\"tooltip2\">S8 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-105") $rssi = "<img src=\"images/3.png\" \> <div class=\"tooltip2\">S7 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-111") $rssi = "<img src=\"images/2.png\" \> <div class=\"tooltip2\">S6 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-117") $rssi = "<img src=\"images/2.png\" \> <div class=\"tooltip2\">S5 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-123") $rssi = "<img src=\"images/1.png\" \> <div class=\"tooltip2\">S4 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-129") $rssi = "<img src=\"images/1.png\" \> <div class=\"tooltip2\">S3 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-135") $rssi = "<img src=\"images/0.png\" \> <div class=\"tooltip2\">S2 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
else if ($rssiVal > "-141") $rssi = "<img src=\"images/0.png\" \> <div class=\"tooltip2\">S1 ($rssiVal dBm)<span class=\"tooltip2text\">(min/max/avg)<br>$rssiString</span></div>";
|
||||
} else {
|
||||
$rssi = $rssiVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (strpos($logLine,"ended RF data") || strpos($logLine,"ended network")) {
|
||||
switch (substr($logLine, 27, strpos($logLine,",") - 27)) {
|
||||
|
@ -489,6 +497,9 @@ function getHeardList($logLines, $onlyLast) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!$onlyLast)
|
||||
continue;
|
||||
}
|
||||
$timestamp = substr($logLine, 3, 23);
|
||||
$mode = substr($logLine, 27, strpos($logLine,",") - 27);
|
||||
|
@ -565,15 +576,35 @@ function getHeardList($logLines, $onlyLast) {
|
|||
$ber = $nxdnber;
|
||||
$rssi = $nxdnrssi;
|
||||
break;
|
||||
case "POCSAG":
|
||||
$callsign = "POCSAG";
|
||||
$name = "";
|
||||
$id = "";
|
||||
$target = "";
|
||||
$source = "";
|
||||
$duration = "";
|
||||
$loss = "";
|
||||
$ber = "";
|
||||
$rssi = "";
|
||||
$alias = "";
|
||||
break;
|
||||
}
|
||||
// Callsign or ID should be less than 11 chars long, otherwise it could be errorneous
|
||||
if ( strlen($callsign) < 11 ) {
|
||||
$name = "";
|
||||
if (defined("ENABLEXTDLOOKUP")) {
|
||||
array_push($heardList, array(convertTimezone($timestamp), $mode, $callsign, $name, $id, $target, $source, $duration, $loss, $ber, $rssi, $alias));
|
||||
if (getEnabled("D-Star", getMMDVMConfig()) == 1) {
|
||||
array_push($heardList, array(convertTimezone($timestamp), $mode, $callsign, $name, $id, $target, $source, $duration, $loss, $ber, $rssi, $alias));
|
||||
} else {
|
||||
array_push($heardList, array(convertTimezone($timestamp), $mode, $callsign, $name, $target, $source, $duration, $loss, $ber, $rssi, $alias));
|
||||
}
|
||||
$alias = "";
|
||||
} else {
|
||||
array_push($heardList, array(convertTimezone($timestamp), $mode, $callsign, $id, $target, $source, $duration, $loss, $ber, $rssi, $alias));
|
||||
if (getEnabled("D-Star", getMMDVMConfig()) == 1) {
|
||||
array_push($heardList, array(convertTimezone($timestamp), $mode, $callsign, $id, $target, $source, $duration, $loss, $ber, $rssi, $alias));
|
||||
} else {
|
||||
array_push($heardList, array(convertTimezone($timestamp), $mode, $callsign, $target, $source, $duration, $loss, $ber, $rssi, $alias));
|
||||
}
|
||||
$alias = "";
|
||||
}
|
||||
$duration = "";
|
||||
|
@ -586,10 +617,43 @@ function getHeardList($logLines, $onlyLast) {
|
|||
return $heardList;
|
||||
}
|
||||
}
|
||||
$duration = "";
|
||||
$loss = "";
|
||||
$ber = "";
|
||||
$rssi = "";
|
||||
$ts1alias = "---";
|
||||
$ts2alias = "---";
|
||||
}
|
||||
return $heardList;
|
||||
}
|
||||
|
||||
// 00000000001111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000111111111122
|
||||
// 01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901
|
||||
// D: 2020-09-21 18:16:12.814 Messages in Queue 0002
|
||||
// M: 2020-09-21 18:16:12.824 Sending message in slot 13 to 0000216, type 6, func Alphanumeric: "YYYYMMDDHHMMSS200921181600"
|
||||
// D: 2020-09-21 18:16:12.825 Messages in Queue 0001
|
||||
// D: 2020-09-21 18:17:00.036 Queueing message to 0000208, type 6, func Alphanumeric: "XTIME=2017210920XTIME=2017210920"
|
||||
function getDAPNETTxList($logLines) {
|
||||
$DAPNETTxList = array();
|
||||
foreach ($logLines as $logLine) {
|
||||
if (strpos($logLine,"Sending")) {
|
||||
$timestamp = substr($logLine, 3, 23);
|
||||
$slot = substr($logLine,51, 2);
|
||||
if ($slot[1] == " ") {
|
||||
$target = substr($logLine,56, 7);
|
||||
} else {
|
||||
$target = substr($logLine,57, 7);
|
||||
}
|
||||
$message = substr($logLine,strpos($logLine, "\""));
|
||||
$message = substr($message,1 , -1);
|
||||
if ($target == "0004520")
|
||||
$message = rot1($message);
|
||||
array_push($DAPNETTxList, array(convertTimezone($timestamp), $slot, $target, $message));
|
||||
}
|
||||
}
|
||||
return $DAPNETTxList;
|
||||
}
|
||||
|
||||
function getLastHeard($logLines, $onlyLast) {
|
||||
//returns last heard list from log
|
||||
$lastHeard = array();
|
||||
|
@ -597,11 +661,11 @@ function getLastHeard($logLines, $onlyLast) {
|
|||
$heardList = getHeardList($logLines, $onlyLast);
|
||||
$counter = 0;
|
||||
foreach ($heardList as $listElem) {
|
||||
if ( ($listElem[1] == "D-Star") || ($listElem[1] == "YSF") || ($listElem[1] == "P25") || ($listElem[1] == "NXDN") || (startsWith($listElem[1], "DMR")) ) {
|
||||
if ( ($listElem[1] == "D-Star") || ($listElem[1] == "YSF") || ($listElem[1] == "P25") || ($listElem[1] == "NXDN") || ($listElem[1] == "POCSAG") || (startsWith($listElem[1], "DMR")) ) {
|
||||
if(!(array_search($listElem[2]."#".$listElem[1].$listElem[4], $heardCalls) > -1)) {
|
||||
// Generate a canonicalized call for QRZ and name lookups
|
||||
$call_canon = preg_replace('/\s+\w$/', '', $listElem[2]);
|
||||
//remove suffix used sometimes in YSF (es: -FT2 , -991)
|
||||
//remove suffix used sometimes in YSF (es: -FT2 , -991)
|
||||
if (strpos($call_canon,"-")!=false) {
|
||||
$call_canon = substr($call_canon, 0, strpos($call_canon, "-"));
|
||||
}
|
||||
|
@ -638,14 +702,17 @@ function getActualMode($metaLastHeard, $mmdvmconfigs) {
|
|||
// returns mode of repeater actual working in
|
||||
$listElem = $metaLastHeard[0];
|
||||
$timestamp = new DateTime($listElem[0],new DateTimeZone(TIMEZONE));
|
||||
$timestamp2 = $timestamp;
|
||||
$timestamp2->add(new DateInterval('PT3S'));
|
||||
$mode = $listElem[1];
|
||||
if (startsWith($mode, "DMR")) {
|
||||
$mode = "DMR";
|
||||
}
|
||||
if (defined("ENABLEXTDLOOKUP") && $listElem[7] == null || !defined("ENABLEXTDLOOKUP") && $listElem[6] == null) {
|
||||
$now = new DateTime('NOW',new DateTimeZone(TIMEZONE));
|
||||
if (defined("ENABLEXTDLOOKUP") && $listElem[7] == null && $mode != "POCSAG" || !defined("ENABLEXTDLOOKUP") && $listElem[6] == null && $mode != "POCSAG" || $mode == "POCSAG" && $now->format('U') <= $timestamp2->format('U') ) {
|
||||
return "<span class=\"badge badge-danger\">".$mode."</span>";
|
||||
} else {
|
||||
$now = new DateTime('NOW',new DateTimeZone(TIMEZONE));
|
||||
|
||||
$hangtime = getConfigItem("General", "ModeHang", $mmdvmconfigs);
|
||||
|
||||
if ($hangtime != "") {
|
||||
|
|
|
@ -29,8 +29,12 @@ exec("wc -l ".DMRIDDATPATH." | cut -f1 -d' '", $output2);
|
|||
<th><?php echo _("Name"); ?></th>
|
||||
<?php
|
||||
}
|
||||
if (getEnabled("D-Star", $mmdvmconfigs) == 1) {
|
||||
?>
|
||||
<th><?php echo _("DSTAR-ID"); ?></th>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<th><?php echo _("Target"); ?></th>
|
||||
<th><?php echo _("Source"); ?></th>
|
||||
<th><?php echo _("Dur (s)"); ?></th>
|
||||
|
|
|
@ -19,8 +19,12 @@ $totalLH = count($lastHeard);
|
|||
<th><?php echo _("Name"); ?></th>
|
||||
<?php
|
||||
}
|
||||
if (getEnabled("D-Star", $mmdvmconfigs) == 1) {
|
||||
?>
|
||||
<th><?php echo _("DSTAR-ID"); ?></th>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<th><?php echo _("Target"); ?></th>
|
||||
<th><?php echo _("Source"); ?></th>
|
||||
<th><?php echo _("Dur (s)"); ?></th>
|
||||
|
|
|
@ -133,4 +133,19 @@ function recursive_array_search($needle,$haystack) {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function rot1($text) {
|
||||
$ric = 0;
|
||||
$slot = 0;
|
||||
$out = "";
|
||||
for ($i = 0; $i < strlen($text); $i++) {
|
||||
if ($i == 0)
|
||||
$ric = ord($text[$i])-31;
|
||||
if ($i == 1)
|
||||
$slot = ord($text[$i])-32;
|
||||
if ($i > 1)
|
||||
$out .= chr(ord($text[$i])-1);
|
||||
}
|
||||
return "Skyper-Rubric-No.: ".$ric.", Slot: ".$slot.", message: ".$out;
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -21,8 +21,12 @@
|
|||
<th><?php echo _("Talker Alias"); ?></th>
|
||||
<?php
|
||||
}
|
||||
if (getEnabled("D-Star", $mmdvmconfigs) == 1) {
|
||||
?>
|
||||
<th><?php echo _("DSTAR-ID"); ?></th>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<th><?php echo _("Target"); ?></th>
|
||||
<th><?php echo _("Source"); ?></th>
|
||||
<th><?php echo _("TX-Time"); ?></th>
|
||||
|
|
|
@ -218,6 +218,10 @@ if (defined("SHOWLOCALTX")) {
|
|||
include "include/localtx_ajax.php";
|
||||
showLapTime("localtx_ajax");
|
||||
}
|
||||
if (defined("SHOWDAPNET")) {
|
||||
include "include/dapnet_ajax.php";
|
||||
showLapTime("dapnet_ajax");
|
||||
}
|
||||
if (defined("ENABLEYSFGATEWAY")|| defined("ENABLEDMRGATEWAY")) {
|
||||
include "include/gatewayinfo.php";
|
||||
showLapTime("gatewayinfo");
|
||||
|
@ -237,7 +241,7 @@ if (!isset($_GET['stoprefresh'])) {
|
|||
echo '<a href=".">'._("start refreshing").'</a>';
|
||||
}
|
||||
?>
|
||||
| <?php echo _("get your own at:");?> <a href="https://github.com/dg9vh/MMDVMHost-Dashboard">https://github.com/dg9vh/MMDVMHost-Dashboard</a> | <?php echo _("Follow me");?> <a href="https://twitter.com/DG9VH">@DG9VH</a> | <a href="credits.php"><?php echo _("Credits");?></a>
|
||||
| <?php echo _("get your own at:");?> <a href="https://github.com/dg9vh/MMDVMHost-Dashboard">https://github.com/dg9vh/MMDVMHost-Dashboard</a> | <?php echo _("Follow me");?> <a href="https://radiosocial.de/@DG9VH">@DG9VH@radiosocial.de</a> | <a href="credits.php"><?php echo _("Credits");?></a>
|
||||
</div>
|
||||
<noscript>
|
||||
For full functionality of this site it is necessary to enable JavaScript.
|
||||
|
|
35
setup.php
35
setup.php
|
@ -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="ENABLEGATEWAY" <?php if (defined("ENABLEYSFGATEWAY")) echo "checked" ?>></div>
|
||||
<div class="panel-body"><input type="checkbox" name="ENABLEYSFGATEWAY" <?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>
|
||||
|
@ -165,10 +165,37 @@ include "include/tools.php";
|
|||
<input type="text" value="<?php echo constant("DMRGATEWAYPATH") ?>" name="DMRGATEWAYPATH" class="form-control" placeholder="/usr/local/bin/" aria-describedby="DMRGATEWAYPATH">
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="YSFGATEWAYINIFILENAME" style="width: 300px"><?php echo _("DMRGateway.ini-filename"); ?></span>
|
||||
<span class="input-group-addon" id="DMRGATEWAYINIFILENAME" style="width: 300px"><?php echo _("DMRGateway.ini-filename"); ?></span>
|
||||
<input type="text" value="<?php echo constant("DMRGATEWAYINIFILENAME") ?>" name="DMRGATEWAYINIFILENAME" class="form-control" placeholder="DMRGateway.ini" aria-describedby="DMRGATEWAYINIFILENAME">
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<h2><?php echo _("DAPNETGateway-Configuration"); ?></h2>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="ENABLEDAPNETGATEWAY" style="width: 300px"><?php echo _("Enable DAPNETGateway"); ?></span>
|
||||
<div class="panel-body"><input type="checkbox" name="ENABLEDAPNETGATEWAY" <?php if (defined("ENABLEDAPNETGATEWAY")) echo "checked" ?>></div>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="DAPNETGATEWAYLOGPATH" style="width: 300px"><?php echo _("Path to DAPNETGateway-logfile"); ?></span>
|
||||
<input type="text" value="<?php echo constant("DAPNETGATEWAYLOGPATH") ?>" name="DAPNETGATEWAYLOGPATH" class="form-control" placeholder="/var/log/DAPNETGateway/" aria-describedby="DAPNETGATEWAYLOGPATH">
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="DAPNETGATEWAYLOGPREFIX" style="width: 300px"><?php echo _("Logfile-prefix"); ?></span>
|
||||
<input type="text" value="<?php echo constant("DAPNETGATEWAYLOGPREFIX") ?>" name="DAPNETGATEWAYLOGPREFIX" class="form-control" placeholder="DAPNETGateway" aria-describedby="DAPNETGATEWAYLOGPREFIX">
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="DAPNETGATEWAYINIPATH" style="width: 300px"><?php echo _("Path to DAPNETGateway.ini"); ?></span>
|
||||
<input type="text" value="<?php echo constant("DAPNETGATEWAYINIPATH") ?>" name="DAPNETGATEWAYINIPATH" class="form-control" placeholder="/etc/DAPNETGateway/" aria-describedby="DAPNETGATEWAYINIPATH">
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="DAPNETGATEWAYPATH" style="width: 300px"><?php echo _("Path to DAPNETGateway-executable"); ?></span>
|
||||
<input type="text" value="<?php echo constant("DAPNETGATEWAYPATH") ?>" name="DAPNETGATEWAYPATH" class="form-control" placeholder="/usr/local/bin/" aria-describedby="DAPNETGATEWAYPATH">
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="DAPNETGATEWAYINIFILENAME" style="width: 300px"><?php echo _("DAPNETGateway.ini-filename"); ?></span>
|
||||
<input type="text" value="<?php echo constant("DAPNETGATEWAYINIFILENAME") ?>" name="DAPNETGATEWAYINIFILENAME" class="form-control" placeholder="DAPNETGateway.ini" aria-describedby="DAPNETGATEWAYINIFILENAME">
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<h2><?php echo _("ircddbgateway-Configuration"); ?></h2>
|
||||
<div class="input-group">
|
||||
|
@ -310,6 +337,10 @@ foreach ($files as $file) {
|
|||
<span class="input-group-addon" id="SHOWLOCALTX" style="width: 300px"><?php echo _("Show Today's local transmissions"); ?></span>
|
||||
<div class="panel-body"><input type="checkbox" name="SHOWLOCALTX" <?php if (defined("SHOWLOCALTX")) echo "checked" ?>></div>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="SHOWDAPNET" style="width: 300px"><?php echo _("Show DAPNET transmissions"); ?></span>
|
||||
<div class="panel-body"><input type="checkbox" name="SHOWDAPNET" <?php if (defined("SHOWDAPNET")) echo "checked" ?>></div>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="SHOWPROGRESSBARS" style="width: 300px"><?php echo _("Show progressbars"); ?></span>
|
||||
<div class="panel-body"><input type="checkbox" name="SHOWPROGRESSBARS" <?php if (defined("SHOWPROGRESSBARS")) echo "checked" ?>></div>
|
||||
|
|
42
txinfo.php
42
txinfo.php
|
@ -26,26 +26,42 @@ foreach ($lastHeard as $listElem) {
|
|||
// echo"<!--";
|
||||
// var_dump($listElem);
|
||||
// echo"-->";
|
||||
if (defined("ENABLEXTDLOOKUP") && $listElem[7] == null || !defined("ENABLEXTDLOOKUP") && $listElem[6] == null) {
|
||||
if (getEnabled("D-Star", $mmdvmconfigs) == 1 && defined("ENABLEXTDLOOKUP") && $listElem[7] == null && $listElem[1] != "POCSAG" || !defined("ENABLEXTDLOOKUP") && $listElem[6] == null && $listElem[1] != "POCSAG" || \
|
||||
getEnabled("D-Star", $mmdvmconfigs) == 0 && defined("ENABLEXTDLOOKUP") && $listElem[6] == null && $listElem[1] != "POCSAG" || !defined("ENABLEXTDLOOKUP") && $listElem[5] == null && $listElem[1] != "POCSAG" ) {
|
||||
echo "<tr>";
|
||||
echo"<td nowrap>$listElem[0]</td>";
|
||||
echo"<td nowrap>$listElem[1]</td>";
|
||||
echo"<td nowrap>$listElem[2]</td>";
|
||||
if (defined("ENABLEXTDLOOKUP")) {
|
||||
echo"<td nowrap>$listElem[3]</td>";
|
||||
if (defined("TALKERALIAS"))
|
||||
echo"<td nowrap>$listElem[11]</td>";
|
||||
echo"<td nowrap>$listElem[4]</td>";
|
||||
echo"<td nowrap>$listElem[5]</td>";
|
||||
if ($listElem[6] == "RF"){
|
||||
echo "<td nowrap><span class=\"badge badge-success\">RF</span></td>";
|
||||
}else{
|
||||
echo"<td nowrap>$listElem[6]</td>";
|
||||
if (getEnabled("D-Star", $mmdvmconfigs) == 1) {
|
||||
if (defined("TALKERALIAS"))
|
||||
echo"<td nowrap>$listElem[11]</td>";
|
||||
echo"<td nowrap>$listElem[4]</td>";
|
||||
echo"<td nowrap>$listElem[5]</td>";
|
||||
if ($listElem[6] == "RF"){
|
||||
echo "<td nowrap><span class=\"badge badge-success\">RF</span></td>";
|
||||
}else{
|
||||
echo"<td nowrap>$listElem[6]</td>";
|
||||
}
|
||||
$d1 = new DateTime($listElem[0], new DateTimeZone(TIMEZONE));
|
||||
$d2 = new DateTime('now', new DateTimeZone(TIMEZONE));
|
||||
$diff = $d2->getTimestamp() - $d1->getTimestamp();
|
||||
echo"<td nowrap>$diff s</td>";
|
||||
} else {
|
||||
if (defined("TALKERALIAS"))
|
||||
echo"<td nowrap>$listElem[10]</td>";
|
||||
echo"<td nowrap>$listElem[4]</td>";
|
||||
if ($listElem[5] == "RF"){
|
||||
echo "<td nowrap><span class=\"badge badge-success\">RF</span></td>";
|
||||
}else{
|
||||
echo"<td nowrap>$listElem[5]</td>";
|
||||
}
|
||||
$d1 = new DateTime($listElem[0], new DateTimeZone(TIMEZONE));
|
||||
$d2 = new DateTime('now', new DateTimeZone(TIMEZONE));
|
||||
$diff = $d2->getTimestamp() - $d1->getTimestamp();
|
||||
echo"<td nowrap>$diff s</td>";
|
||||
}
|
||||
$d1 = new DateTime($listElem[0], new DateTimeZone(TIMEZONE));
|
||||
$d2 = new DateTime('now', new DateTimeZone(TIMEZONE));
|
||||
$diff = $d2->getTimestamp() - $d1->getTimestamp();
|
||||
echo"<td nowrap>$diff s</td>";
|
||||
} else {
|
||||
if (defined("TALKERALIAS"))
|
||||
echo"<td nowrap>$listElem[10]</td>";
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
define("VERSION", "20200921-2 (".getGitVersion().")");
|
||||
define("VERSION", "20201031-1 (".getGitVersion().")");
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue