mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
Fix blank hash/call in mesh tables
This commit is contained in:
parent
9aa819abf3
commit
6c1d8a1415
1 changed files with 17 additions and 36 deletions
|
@ -67,37 +67,30 @@ ipcRenderer.on("action-update-mesh-table", (event, arg) => {
|
|||
|
||||
var dxcall = document.createElement("td");
|
||||
var dxcallText = document.createElement("span");
|
||||
dxcallText.innerText = routes[i]["dxcall"];
|
||||
|
||||
// check for callsign in callsign list, else use checksum
|
||||
try{
|
||||
for (let call in callsigns) {
|
||||
if(callsigns[call] == routes[i]["dxcall"]){
|
||||
dxcallText.innerText = routes[i]["dxcall"] + ' (' + call + ')';
|
||||
}
|
||||
}
|
||||
} catch(e){
|
||||
dxcallText.innerText = routes[i]["dxcall"];
|
||||
for (let call in callsigns) {
|
||||
if(callsigns[call] == routes[i]["dxcall"]){
|
||||
dxcallText.innerText +=' (' + call + ')';
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
dxcall.appendChild(dxcallText);
|
||||
|
||||
|
||||
var router = document.createElement("td");
|
||||
var routerText = document.createElement("span");
|
||||
routerText.innerText = routes[i]["router"];
|
||||
|
||||
// check for callsign in callsign list, else use checksum
|
||||
try{
|
||||
for (let call in callsigns) {
|
||||
if(callsigns[call] == routes[i]["router"]){
|
||||
routerText.innerText = routes[i]["router"] + ' (' + call + ')';
|
||||
}
|
||||
}
|
||||
} catch(e){
|
||||
routerText.innerText = routes[i]["router"];
|
||||
for (let call in callsigns) {
|
||||
if(callsigns[call] == routes[i]["router"]){
|
||||
routerText.innerText += ' (' + call + ')';
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
router.appendChild(routerText);
|
||||
|
||||
|
||||
var hops = document.createElement("td");
|
||||
var hopsText = document.createElement("span");
|
||||
hopsText.innerText = routes[i]["hops"];
|
||||
|
@ -158,20 +151,14 @@ ipcRenderer.on("action-update-mesh-table", (event, arg) => {
|
|||
var destinationText = document.createElement("span");
|
||||
destinationText.innerText = routes[i]["destination"];
|
||||
// check for callsign in callsign list, else use checksum
|
||||
try{
|
||||
for (let call in callsigns) {
|
||||
if(callsigns[call] == routes[i]["destination"]){
|
||||
destinationText.innerText = routes[i]["destination"] + ' (' + call + ')';
|
||||
}
|
||||
for (let call in callsigns) {
|
||||
if(callsigns[call] == routes[i]["destination"]){
|
||||
destinationText.innerText += ' (' + call + ')';
|
||||
continue;
|
||||
}
|
||||
} catch(e){
|
||||
destinationText.innerText = routes[i]["destination"];
|
||||
}
|
||||
|
||||
destination.appendChild(destinationText);
|
||||
|
||||
|
||||
|
||||
var router = document.createElement("td");
|
||||
var routerText = document.createElement("span");
|
||||
routerText.innerText = routes[i]["router"];
|
||||
|
@ -207,10 +194,4 @@ ipcRenderer.on("action-update-mesh-table", (event, arg) => {
|
|||
|
||||
tbl.appendChild(row);
|
||||
}
|
||||
|
||||
if (tbl !== null) {
|
||||
// scroll to bottom of page
|
||||
// https://stackoverflow.com/a/11715670
|
||||
//window.scrollTo(0, document.body.scrollHeight);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue