Added "All Heard"-Tab (to show all transmissions not reduced to last heard)
and made some configuration-mods to have config easier. Please take a look at config.js
This commit is contained in:
parent
b8890bee9a
commit
c9e5ae53db
3 changed files with 73 additions and 40 deletions
|
@ -46,6 +46,9 @@
|
|||
<li class="nav-item" name="localheard">
|
||||
<a class="nav-link" id="localheard-tab" data-toggle="tab" href="#localheard" role="tab" aria-controls="localheard" aria-selected="false">Local Heard</a>
|
||||
</li>
|
||||
<li class="nav-item" name="allheard">
|
||||
<a class="nav-link" id="allheard-tab" data-toggle="tab" href="#allheard" role="tab" aria-controls="allheard" aria-selected="false">All Heard</a>
|
||||
</li>
|
||||
<li class="nav-item" name="qso">
|
||||
<a class="nav-link" id="qso-tab" data-toggle="tab" href="#qso" role="tab" aria-controls="qso" aria-selected="false">In QSO</a>
|
||||
</li>
|
||||
|
@ -137,6 +140,33 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="allheard" role="tabpanel" aria-labelledby="allheard-tab">
|
||||
<div class="panel panel-default">
|
||||
<!-- Standard-Panel-Inhalt -->
|
||||
<div class="panel-heading">ALl Heard List<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="allHeard" class="table allHeard table-condensed table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Time (<script language="JavaScript">
|
||||
document.write(getTimezone());
|
||||
</script>)</th>
|
||||
<th>Mode</th>
|
||||
<th>Callsign</th>
|
||||
<th>Target</th>
|
||||
<th>Source</th>
|
||||
<th>Dur (s)</th>
|
||||
<th>BER</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="qso" role="tabpanel" aria-labelledby="qso-tab">
|
||||
<div class="panel panel-default">
|
||||
<!-- Standard-Panel-Inhalt -->
|
||||
|
@ -278,25 +308,34 @@
|
|||
"autoWidth": false
|
||||
} );
|
||||
|
||||
var t_allh = $('#allHeard').DataTable( {
|
||||
"order": [[ 0, "desc" ]],
|
||||
"columnDefs": [
|
||||
{ className: "dt-nowrap", "targets": [ 0, 1, 2, 3, 6 ] }
|
||||
],
|
||||
"autoWidth": false
|
||||
} );
|
||||
|
||||
var t_dapnet = $('#dapnetmessages').DataTable( {
|
||||
"order": [[ 0, "desc" ]]
|
||||
} );
|
||||
|
||||
if (sysinfo > 0) {
|
||||
var ws3 = new WebSocket("ws://" + window.location.hostname + ":5678/SYSINFO");
|
||||
ws3.onmessage = function (event) {
|
||||
var ws0 = new WebSocket("ws://" + window.location.hostname + ":5678/SYSINFO");
|
||||
ws0.onmessage = function (event) {
|
||||
getSysInfo(document, event);
|
||||
};
|
||||
}
|
||||
|
||||
var ws1 = new WebSocket("ws://" + window.location.hostname + ":5678/MMDVM");
|
||||
ws1.onmessage = function (event) {
|
||||
getLastHeard(document, event);
|
||||
getLocalHeard(document, event);
|
||||
if (lastheard > 0)
|
||||
getLastHeard(document, event);
|
||||
if (localheard > 0)
|
||||
getLocalHeard(document, event);
|
||||
if (allheard > 0)
|
||||
getAllHeard(document, event);
|
||||
};
|
||||
t_lh.order( [ 0, 'desc' ] ).draw();
|
||||
t_localh.order( [ 0, 'desc' ] ).draw();
|
||||
|
||||
|
||||
var t_qso = $('#inQSO').DataTable( {
|
||||
"order": [[ 2, "asc" ]],
|
||||
|
|
|
@ -9,19 +9,16 @@ var warnlevel = 200;
|
|||
var emergencylevel = 500;
|
||||
|
||||
|
||||
// 1 = show tab, 0 = suppress it
|
||||
// 1 = show tab, 2 = show tab and make it default-tab on startup, 0 = suppress it
|
||||
var currtx = 1;
|
||||
var lastheard = 1;
|
||||
var lastheard = 2;
|
||||
var localheard = 1;
|
||||
var allheard = 1;
|
||||
var qso = 1;
|
||||
var dapnet = 1;
|
||||
var sysinfo = 1;
|
||||
var about = 1;
|
||||
|
||||
// default-tab to show
|
||||
// chose from following list: CurrTXTab, LastHeardTab, LocalHeadTab, InQSOTab, DAPNETMessagesTab, SysInfoTab, AboutTab
|
||||
var defaultTab = "LastHeardTab";
|
||||
|
||||
// Set displayed timezone and timestamp to timezone of browser if 1, else use UTC for displaying
|
||||
var useClientTimezone = 1;
|
||||
|
||||
|
|
|
@ -504,6 +504,27 @@ function getLocalHeard(document, event) {
|
|||
});
|
||||
}
|
||||
|
||||
function getAllHeard(document, event) {
|
||||
$(document).ready(function() {
|
||||
lines = event.data.split("\n");
|
||||
lines.forEach(function(line, index, array) {
|
||||
if (line.indexOf("network watchdog") < 0 ) {
|
||||
if (getDuration(line) !== "") {
|
||||
t_allh.row.add( [
|
||||
getTimestamp(line),
|
||||
getMode(line),
|
||||
getCallsign(line),
|
||||
getTarget(line),
|
||||
getSource(line),
|
||||
getDuration(line),
|
||||
getBER(line)
|
||||
] ).draw(false);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function getDapnetMessages(document, event) {
|
||||
$(document).ready(function() {
|
||||
lines = event.data.split("\n");
|
||||
|
@ -618,32 +639,8 @@ $(document).ready(function() {
|
|||
document.getElementById("myTab").children[i].style.display="none";
|
||||
document.getElementById(tabname).style.display="none";
|
||||
}
|
||||
}
|
||||
|
||||
switch (defaultTab) {
|
||||
case "CurrTXTab":
|
||||
activateDefaultTab("currtx");
|
||||
break;
|
||||
case "LastHeardTab":
|
||||
activateDefaultTab("lastheard");
|
||||
break;
|
||||
case "LocalHeadTab":
|
||||
activateDefaultTab("localheard");
|
||||
break;
|
||||
case "InQSOTab":
|
||||
activateDefaultTab("qso");
|
||||
break;
|
||||
case "DAPNETMessagesTab":
|
||||
activateDefaultTab("dapnet");
|
||||
break;
|
||||
case "SysInfoTab":
|
||||
activateDefaultTab("sysinfo");
|
||||
break;
|
||||
case "AboutTab":
|
||||
activateDefaultTab("about");
|
||||
break;
|
||||
default:
|
||||
activateDefaultTab("currtx");
|
||||
break;
|
||||
if (eval(tabname) == 2) {
|
||||
activateDefaultTab(tabname);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue