diff --git a/html/js/functions.js b/html/js/functions.js
index cac9ac7..7ed5d80 100644
--- a/html/js/functions.js
+++ b/html/js/functions.js
@@ -87,16 +87,29 @@ function getMode(logline) {
function getCallsign(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("$"));
+ }
if (qrz == 1) {
- return '' + callsign + '';
+ if (name != "") {
+ return '
';
+ } else {
+ return '' + callsign + '';
+ }
} else {
- return callsign;
+ if (name != "") {
+ return '' + callsign + 'Name:
' + name + '
';
+ } else {
+ return callsign;
+ }
}
}
function getRawTarget(logline) {
- if(logline.indexOf("at") > 0 && logline.indexOf("late entry") < 0 ) {
- return logline.substring(logline.indexOf("to") + 3, logline.lastIndexOf("at"));
+ if(logline.indexOf(" at ") > 0 && logline.indexOf("late entry") < 0 ) {
+ return logline.substring(logline.indexOf("to") + 3, logline.lastIndexOf(" at ") + 1);
} else {
val = logline.substring(logline.indexOf("to") + 3);
if (val.indexOf(",") > 0) {
@@ -265,6 +278,28 @@ function copyToQSO(callsign) {
}
+function getCallsign(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("$"));
+ }
+ if (qrz == 1) {
+ if (name != "") {
+ return '';
+ } else {
+ return '' + callsign + '';
+ }
+ } else {
+ if (name != "") {
+ return '' + callsign + 'Name:
' + name + '
';
+ } else {
+ return callsign;
+ }
+ }
+}
+
function getCurrentTXing() {
ts1 = null;
ts2 = null;
@@ -290,6 +325,25 @@ function getCurrentTXing() {
}
t_ct.clear().draw(false);
if (ts1 != null) {
+ callsign = ts1[1];
+ name = "";
+ if (callsign.indexOf("$") > 0) {
+ name = callsign.substring(callsign.indexOf("$") + 1, callsign.lastIndexOf("$"));
+ callsign = callsign.substring(0, callsign.indexOf("$"));
+ }
+ if (qrz == 1) {
+ if (name != "") {
+ ts1[1] = '';
+ } else {
+ ts1[1] = '' + callsign + '';
+ }
+ } else {
+ if (name != "") {
+ ts1[1] = '' + callsign + 'Name:
' + name + '
';
+ } else {
+ ts1[1] = callsign;
+ }
+ }
t_ct.row.add( [
ts1[0],
ts1[1],
@@ -299,6 +353,25 @@ function getCurrentTXing() {
] ).draw(false);
}
if (ts2 != null) {
+ callsign = ts2[1];
+ name = "";
+ if (callsign.indexOf("$") > 0) {
+ name = callsign.substring(callsign.indexOf("$") + 1, callsign.lastIndexOf("$"));
+ callsign = callsign.substring(0, callsign.indexOf("$"));
+ }
+ if (qrz == 1) {
+ if (name != "") {
+ ts2[1] = '';
+ } else {
+ ts2[1] = '' + callsign + '';
+ }
+ } else {
+ if (name != "") {
+ ts2[1] = '' + callsign + 'Name:
' + name + '
';
+ } else {
+ ts2[1] = callsign;
+ }
+ }
t_ct.row.add( [
ts2[0],
ts2[1],
@@ -319,7 +392,7 @@ function getLastHeard(document, event) {
lines = event.data.split("\n");
var duration = 0;
lines.forEach(function(line, index, array) {
- logIt(line);
+ logIt("LogLine: " + line);
if (line.indexOf("MMDVMHost") > 0 ) {
mmdvmhost_version = line.substring(line.indexOf("MMDVMHost"));
diff --git a/html/js/version.js b/html/js/version.js
index 51c3ad5..32b9762 100644
--- a/html/js/version.js
+++ b/html/js/version.js
@@ -1 +1 @@
-var dashboard_version = "2021-02-03 10:37:00";
+var dashboard_version = "2021-02-03 22:06:20";
diff --git a/logtailer.ini b/logtailer.ini
index eff15dc..99fc55e 100644
--- a/logtailer.ini
+++ b/logtailer.ini
@@ -11,7 +11,7 @@ Filerotate=True
[MMDVMHost]
Logdir=/mnt/ramdisk/
Prefix=MMDVM
-DMR_ID_Lookup=0
+DMR_ID_Lookup=1
DMR_ID_LookupFile=/etc/MMDVM/DMRIds.dat
[DAPNETGateway]
diff --git a/logtailer.py b/logtailer.py
index ec2eefd..85e3643 100644
--- a/logtailer.py
+++ b/logtailer.py
@@ -217,14 +217,6 @@ def log_close(websocket, path, exception=None):
def websocketserver():
- ''' # set first argument for the handler to current working directory
- handler = functools.partial(process_request, os.getcwd())
- start_server = websockets.serve(view_log, config['DEFAULT']['Host'], config['DEFAULT']['Port'], process_request=handler)
- asyncio.get_event_loop().run_until_complete(start_server)
- message = 'Started Websocketserver at {}:{}'.format(config['DEFAULT']['Host'], config['DEFAULT']['Port'])
- logging.info(message)
- asyncio.get_event_loop().run_forever()
- '''
start_server = websockets.serve(view_log, config['DEFAULT']['Host'], config['DEFAULT']['Port'])
asyncio.get_event_loop().run_until_complete(start_server)
asyncio.get_event_loop().run_forever()
@@ -252,7 +244,7 @@ def main():
if line.find("\t"):
separator = "\t"
tokens = line.split(separator)
- dmrids[tokens[0]] = tokens[1]
+ dmrids[tokens[0]] = tokens[1] + "$" + tokens[2].replace("\r", "").replace("\n", "") + "$"
logging.info("Starting Websocketserver")
websocketserver()