1
0
Fork 0

Added Dashboard-Blacklist into config.js to avoid visibility of Callsigns listed in this

main
Kim Huebel 4 years ago
parent c926da435d
commit cf76ef5ac3

@ -30,3 +30,9 @@ var showBMTGLink = 1;
var qrz_blacklist = [
"N0CALL",
]
// Array of callsigns that should generally not be listed on the dashboard
var dashboard_blacklist = [
"MY0CALL",
]

@ -54,6 +54,16 @@ function getTimezone() {
}
}
function inDashboardBlacklist(logline) {
callsign = logline.substring(logline.indexOf("from") + 5, logline.indexOf("to")).trim();
name = "";
if (callsign.indexOf("$") > 0) {
name = callsign.substring(callsign.indexOf("$") + 1, callsign.lastIndexOf("$"));
callsign = callsign.substring(0, callsign.indexOf("$"));
}
return dashboard_blacklist.includes(callsign);
}
function isDMRHost(logline) {
if (logline.charAt(22) == " ")
return true;
@ -418,6 +428,7 @@ function getLastHeard(document, event) {
var duration = 0;
lines.forEach(function(line, index, array) {
logIt("LogLine: " + line);
if (!inDashboardBlacklist(line)) {
/*
if (line.indexOf("MMDVMHost") > 0 ) {
mmdvmhost_version = line.substring(line.indexOf("MMDVMHost"));
@ -604,6 +615,7 @@ function getLastHeard(document, event) {
$('#lastHeard').dataTable().fnUpdate(temp,rowIndexes[0],undefined,false);
}
}
}
});
});
}
@ -613,6 +625,7 @@ function getLocalHeard(document, event) {
$(document).ready(function() {
lines = event.data.split("\n");
lines.forEach(function(line, index, array) {
if (!inDashboardBlacklist(line)) {
if (getSource(line) == "RF") {
if (getDuration(line) !== "") {
t_localh.row.add( [
@ -626,6 +639,7 @@ function getLocalHeard(document, event) {
] ).draw(false);
}
}
}
});
});
}
@ -634,6 +648,7 @@ function getAllHeard(document, event) {
$(document).ready(function() {
lines = event.data.split("\n");
lines.forEach(function(line, index, array) {
if (!inDashboardBlacklist(line)) {
if (line.indexOf("network watchdog") < 0 ) {
if (getDuration(line) !== "") {
t_allh.row.add( [
@ -648,6 +663,7 @@ function getAllHeard(document, event) {
] ).draw(false);
}
}
}
});
});
}

@ -1 +1 @@
var dashboard_version = "2021-02-06 23:30:37";
var dashboard_version = "2021-02-07 21:02:58";

Loading…
Cancel
Save