Added Dashboard-Blacklist into config.js to avoid visibility of Callsigns listed in this
This commit is contained in:
parent
c926da435d
commit
cf76ef5ac3
3 changed files with 223 additions and 201 deletions
|
@ -30,3 +30,9 @@ var showBMTGLink = 1;
|
||||||
var qrz_blacklist = [
|
var qrz_blacklist = [
|
||||||
"N0CALL",
|
"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) {
|
function isDMRHost(logline) {
|
||||||
if (logline.charAt(22) == " ")
|
if (logline.charAt(22) == " ")
|
||||||
return true;
|
return true;
|
||||||
|
@ -418,6 +428,7 @@ function getLastHeard(document, event) {
|
||||||
var duration = 0;
|
var duration = 0;
|
||||||
lines.forEach(function(line, index, array) {
|
lines.forEach(function(line, index, array) {
|
||||||
logIt("LogLine: " + line);
|
logIt("LogLine: " + line);
|
||||||
|
if (!inDashboardBlacklist(line)) {
|
||||||
/*
|
/*
|
||||||
if (line.indexOf("MMDVMHost") > 0 ) {
|
if (line.indexOf("MMDVMHost") > 0 ) {
|
||||||
mmdvmhost_version = line.substring(line.indexOf("MMDVMHost"));
|
mmdvmhost_version = line.substring(line.indexOf("MMDVMHost"));
|
||||||
|
@ -604,6 +615,7 @@ function getLastHeard(document, event) {
|
||||||
$('#lastHeard').dataTable().fnUpdate(temp,rowIndexes[0],undefined,false);
|
$('#lastHeard').dataTable().fnUpdate(temp,rowIndexes[0],undefined,false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -613,6 +625,7 @@ 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) {
|
||||||
|
if (!inDashboardBlacklist(line)) {
|
||||||
if (getSource(line) == "RF") {
|
if (getSource(line) == "RF") {
|
||||||
if (getDuration(line) !== "") {
|
if (getDuration(line) !== "") {
|
||||||
t_localh.row.add( [
|
t_localh.row.add( [
|
||||||
|
@ -626,6 +639,7 @@ function getLocalHeard(document, event) {
|
||||||
] ).draw(false);
|
] ).draw(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -634,6 +648,7 @@ function getAllHeard(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) {
|
||||||
|
if (!inDashboardBlacklist(line)) {
|
||||||
if (line.indexOf("network watchdog") < 0 ) {
|
if (line.indexOf("network watchdog") < 0 ) {
|
||||||
if (getDuration(line) !== "") {
|
if (getDuration(line) !== "") {
|
||||||
t_allh.row.add( [
|
t_allh.row.add( [
|
||||||
|
@ -648,6 +663,7 @@ function getAllHeard(document, event) {
|
||||||
] ).draw(false);
|
] ).draw(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
var dashboard_version = "2021-02-06 23:30:37";
|
var dashboard_version = "2021-02-07 21:02:58";
|
||||||
|
|
Loading…
Reference in a new issue