Misc tweaks

This commit is contained in:
Ian Renton
2025-09-30 22:18:02 +01:00
parent 6749a97f99
commit 9e495a3fae
4 changed files with 14 additions and 3 deletions

View File

@@ -91,6 +91,10 @@ class Spot:
# Infer missing parameters where possible
def infer_missing(self):
# Clean up DX call if it has an SSID or -# from RBN
if self.dx_call and "-" in self.dx_call:
self.dx_call = self.dx_call.split("-")[0]
# DX country, continent, zones etc. from callsign
if self.dx_call and not self.dx_country:
self.dx_country = infer_country_from_callsign(self.dx_call)
@@ -105,6 +109,10 @@ class Spot:
if self.dx_dxcc_id and not self.dx_flag:
self.dx_flag = DXCC_FLAGS[self.dx_dxcc_id]
# Clean up spotter call if it has an SSID or -# from RBN
if self.de_call and "-" in self.de_call:
self.de_call = self.de_call.split("-")[0]
# Spotter country, continent, zones etc. from callsign
if self.de_call and not self.de_country:
self.de_country = infer_country_from_callsign(self.de_call)

View File

@@ -31,7 +31,7 @@ class GMA(HTTPProvider):
dx_call=source_spot["ACTIVATOR"].upper(),
de_call=source_spot["SPOTTER"].upper(),
freq=float(source_spot["QRG"]) if (source_spot["QRG"] != "") else None, # Seen GMA spots with no frequency
mode=source_spot["MODE"].upper(),
mode=source_spot["MODE"].upper() if "<>" not in source_spot["MODE"] else None, # Filter out some weird mode strings
comment=source_spot["TEXT"],
sig_refs=[source_spot["REF"]],
sig_refs_names=[source_spot["NAME"]],

View File

@@ -46,7 +46,10 @@
<p><a href="#" onclick="hideInfo()">&laquo; Back to the spots table</a></p>
</div>
<div id="table-container"></div>
<div id="table-container">
<p>Latest spots as of XXXX. Updating in XXX seconds...</p>
<div id="table-container-inner"></div>
</div>
</main>
</div>

View File

@@ -17,7 +17,7 @@ $.getJSON('/api/spots', function(jsonData) {
table.find('tbody').append($tr);
});
$('#table-container').html(table);
$('#table-container-inner').html(table);
});
function escapeHtml(str) {