make talker-alias configurable
This commit is contained in:
parent
745f317d3d
commit
c5b8592ffb
6 changed files with 15 additions and 6 deletions
|
@ -242,7 +242,6 @@ function getHeardList($logLines, $onlyLast) {
|
||||||
$alias = "";
|
$alias = "";
|
||||||
|
|
||||||
foreach ($logLines as $logLine) {
|
foreach ($logLines as $logLine) {
|
||||||
//echo $logLine;
|
|
||||||
$duration = "";
|
$duration = "";
|
||||||
$loss = "";
|
$loss = "";
|
||||||
$ber = "";
|
$ber = "";
|
||||||
|
@ -261,7 +260,7 @@ function getHeardList($logLines, $onlyLast) {
|
||||||
} else if(strpos($logLine,"bad LC received")) {
|
} else if(strpos($logLine,"bad LC received")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//$alias = substr($logLine, 27, 5);
|
|
||||||
if(strpos($logLine, "0000") > 0){
|
if(strpos($logLine, "0000") > 0){
|
||||||
$decodedAlias = decodeAlias($logLine);
|
$decodedAlias = decodeAlias($logLine);
|
||||||
if ($alias =="")
|
if ($alias =="")
|
||||||
|
|
|
@ -116,7 +116,7 @@ function convertTimezone($timestamp) {
|
||||||
function encode($hex) {
|
function encode($hex) {
|
||||||
$validchars = " abcdefghijklmnopqrstuvwxyzäöüßABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜ0123456789";
|
$validchars = " abcdefghijklmnopqrstuvwxyzäöüßABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜ0123456789";
|
||||||
$str = '';
|
$str = '';
|
||||||
$chrval = hexdec(substr($hex,$i,2));
|
$chrval = hexdec($hex);
|
||||||
$str = chr($chrval);
|
$str = chr($chrval);
|
||||||
if (strpos($validchars, $str)>=0)
|
if (strpos($validchars, $str)>=0)
|
||||||
return $str;
|
return $str;
|
||||||
|
|
|
@ -15,8 +15,12 @@
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
if (defined("TALKERALIAS")) {
|
||||||
?>
|
?>
|
||||||
<th>Talker Alias</th>
|
<th>Talker Alias</th>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
<th>DSTAR-ID</th>
|
<th>DSTAR-ID</th>
|
||||||
<th>Target</th>
|
<th>Target</th>
|
||||||
<th>Source</th>
|
<th>Source</th>
|
||||||
|
|
|
@ -295,6 +295,10 @@ get_tz_options(constant("TIMEZONE"), "Timezone", '');
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="input-group">
|
||||||
|
<span class="input-group-addon" id="TALKERALIAS" style="width: 300px">Show Talker Alias</span>
|
||||||
|
<div class="panel-body"><input type="checkbox" name="TALKERALIAS" <?php if (defined("TALKERALIAS")) echo "checked" ?>></div>
|
||||||
|
</div>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-btn">
|
<span class="input-group-btn">
|
||||||
<button class="btn btn-default" type="submit" form="config">Save configuration</button>
|
<button class="btn btn-default" type="submit" form="config">Save configuration</button>
|
||||||
|
|
|
@ -44,6 +44,7 @@ foreach ($lastHeard as $listElem) {
|
||||||
if (defined("ENABLEXTDLOOKUP")) {
|
if (defined("ENABLEXTDLOOKUP")) {
|
||||||
//echo "<td nowrap>".getName($listElem[2])."</td>";
|
//echo "<td nowrap>".getName($listElem[2])."</td>";
|
||||||
echo"<td nowrap>$listElem[3]</td>";
|
echo"<td nowrap>$listElem[3]</td>";
|
||||||
|
if (defined("TALKERALIAS"))
|
||||||
echo"<td nowrap>$listElem[11]</td>";
|
echo"<td nowrap>$listElem[11]</td>";
|
||||||
echo"<td nowrap>$listElem[4]</td>";
|
echo"<td nowrap>$listElem[4]</td>";
|
||||||
echo"<td nowrap>$listElem[5]</td>";
|
echo"<td nowrap>$listElem[5]</td>";
|
||||||
|
@ -57,6 +58,7 @@ foreach ($lastHeard as $listElem) {
|
||||||
$diff = $d2->getTimestamp() - $d1->getTimestamp();
|
$diff = $d2->getTimestamp() - $d1->getTimestamp();
|
||||||
echo"<td nowrap>$diff s</td>";
|
echo"<td nowrap>$diff s</td>";
|
||||||
} else {
|
} else {
|
||||||
|
if (defined("TALKERALIAS"))
|
||||||
echo"<td nowrap>$listElem[10]</td>";
|
echo"<td nowrap>$listElem[10]</td>";
|
||||||
echo"<td nowrap>$listElem[3]</td>";
|
echo"<td nowrap>$listElem[3]</td>";
|
||||||
echo"<td nowrap>$listElem[4]</td>";
|
echo"<td nowrap>$listElem[4]</td>";
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
define("VERSION", "20170120-1");
|
define("VERSION", "20170213-1");
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in a new issue