1
0
Fork 0

Added origin of YSF-transmission to Target (if possible).

main
Kim Huebel 3 years ago
parent 82d07b4b52
commit 90200a2718

@ -42,4 +42,4 @@ var dashboard_blacklist = [
] ]
// 1 = enable dark display theme, 0 = use bright theme // 1 = enable dark display theme, 0 = use bright theme
var useDarkTheme = 1; var useDarkTheme = 1;

@ -273,9 +273,17 @@ function getTarget(logline) {
return '<div class=\"tooltip2\">' + link + '<span class=\"tooltip2text\">Origin:<br>' + target + '</span></div>'; return '<div class=\"tooltip2\">' + link + '<span class=\"tooltip2text\">Origin:<br>' + target + '</span></div>';
} }
} else { } else {
return '<div class=\"tooltip2\">' + resolveTarget(getMode(logline), getTimeslot(getMode(logline)), target) + '<span class=\"tooltip2text\">Origin:<br>' + target + '</span></div>'; retval = '<div class=\"tooltip2\">' + resolveTarget(getMode(logline), getTimeslot(getMode(logline)), target) + '<span class=\"tooltip2text\">Origin:<br>' + target + '</span></div>';
if (getMode(logline) == "YSF" && logline.indexOf(" at ") > 0) {
via = logline.substr(logline.indexOf(" at "));
if (via.indexOf("$") > 0) {
via = via.substr(0, via.indexOf("$"));
}
retval += " @ " + via;
}
return retval;
} }
} }
function getSource(logline) { function getSource(logline) {
if (logline.indexOf("received") > 0) { if (logline.indexOf("received") > 0) {
@ -633,16 +641,9 @@ function getLastHeard(document, event) {
} }
} }
if (line.indexOf("network watchdog") > 0 || line.indexOf("end of voice transmission") > 0 || line.indexOf("end of transmission") > 0 || line.indexOf("transmission lost") > 0 ) { if (line.indexOf("network watchdog") > 0 || line.indexOf("end of voice transmission") > 0 || line.indexOf("end of transmission") > 0 || line.indexOf("transmission lost") > 0 ) {
if (getMode(line) == "DMR Slot 1" ) {
ts1TXing = null;
} else {
ts2TXing = null;
}
txing = false; txing = false;
if (line.indexOf("network watchdog") > 0) { if (line.indexOf("network watchdog") > 0) {
logIt("Network Watchdog!"); logIt("Network Watchdog!");
var rowIndexes = []; var rowIndexes = [];
t_lh.rows( function ( idx, data, node ) { t_lh.rows( function ( idx, data, node ) {
if (getMode(line) == "DMR Slot 1" ) { if (getMode(line) == "DMR Slot 1" ) {
@ -689,17 +690,23 @@ function getLastHeard(document, event) {
} }
} }
} }
} }
logIt("TS1: " + ts1TXing + "|" + ts1timestamp); logIt("TS1: " + ts1TXing + "|" + ts1timestamp);
logIt("TS2: " + ts2TXing + "|" + ts2timestamp); logIt("TS2: " + ts2TXing + "|" + ts2timestamp);
getCurrentTXing(); getCurrentTXing();
if (line.indexOf("network watchdog") < 0 ) { if (line.indexOf("network watchdog") < 0 ) {
ts2tmp = [];
if (ts2TXing != null) {
matchstring = "";
ts2tmp = ts2TXing.split(";");
}
var rowIndexes = [], var rowIndexes = [],
timestamp = getTimestamp(line), timestamp = getTimestamp(line),
mode = getMode(line), mode = getMode(line),
callsign = getCallsign(line), callsign = getCallsign(line),
target = getTarget(line), target = ts2tmp[2],
source = getSource(line), source = getSource(line),
duration = getDuration(line), duration = getDuration(line),
loss = getLoss(line), loss = getLoss(line),
@ -709,6 +716,12 @@ function getLastHeard(document, event) {
duration = "TXing"; duration = "TXing";
loss = ""; loss = "";
ber = ""; ber = "";
} else {
if (getMode(line) == "DMR Slot 1" ) {
ts1TXing = null;
} else {
ts2TXing = null;
}
} }
if (mode == "POCSAG") { if (mode == "POCSAG") {
callsign = "POCSAG"; callsign = "POCSAG";
@ -725,23 +738,35 @@ function getLastHeard(document, event) {
} }
return false; return false;
}); });
if (rowIndexes[0] == "0") { if (rowIndexes[0] == "0") {
t_lh.row(rowIndexes[0]).remove().draw(false); t_lh.row(rowIndexes[0]).remove().draw(false);
} }
if (rowIndexes[0]) { if (rowIndexes[0]) {
if (t_lh.row(rowIndexes[0]).data[0] != null) {
newData = [ newData = [
timestamp, timestamp,
mode, mode,
callsign, callsign,
target, target,
source, source,
duration, duration,
loss, loss,
ber, ber,
addToQSO addToQSO
] ]
} else {
newData = [
timestamp,
mode,
callsign,
target,
source,
duration,
loss,
ber,
addToQSO
]
}
t_lh.row(rowIndexes[0]).data( newData ).draw(false); t_lh.row(rowIndexes[0]).data( newData ).draw(false);
} else { } else {
t_lh.row.add( [ t_lh.row.add( [
@ -770,7 +795,6 @@ function getLastHeard(document, event) {
} }
function getLocalHeard(document, event) { function getLocalHeard(document, event) {
$(document).ready(function() { $(document).ready(function() {
lines = event.data.split("\n"); lines = event.data.split("\n");
lines.forEach(function(line, index, array) { lines.forEach(function(line, index, array) {
@ -1028,4 +1052,4 @@ function processData(data) {
talkgroups.push([rowCells[0], rowCells[1], rowCells[2], rowCells[3], rowCells[4]]); talkgroups.push([rowCells[0], rowCells[1], rowCells[2], rowCells[3], rowCells[4]]);
} }
logIt("Parsed TGs: " + talkgroups); logIt("Parsed TGs: " + talkgroups);
} }

@ -1 +1 @@
var dashboard_version = "2021-04-25 18:56:19"; var dashboard_version = "2021-04-26 14:58:26";

Loading…
Cancel
Save