mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 08:49:27 +00:00
Misc tweaks
This commit is contained in:
@@ -91,6 +91,10 @@ class Spot:
|
|||||||
|
|
||||||
# Infer missing parameters where possible
|
# Infer missing parameters where possible
|
||||||
def infer_missing(self):
|
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
|
# DX country, continent, zones etc. from callsign
|
||||||
if self.dx_call and not self.dx_country:
|
if self.dx_call and not self.dx_country:
|
||||||
self.dx_country = infer_country_from_callsign(self.dx_call)
|
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:
|
if self.dx_dxcc_id and not self.dx_flag:
|
||||||
self.dx_flag = DXCC_FLAGS[self.dx_dxcc_id]
|
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
|
# Spotter country, continent, zones etc. from callsign
|
||||||
if self.de_call and not self.de_country:
|
if self.de_call and not self.de_country:
|
||||||
self.de_country = infer_country_from_callsign(self.de_call)
|
self.de_country = infer_country_from_callsign(self.de_call)
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class GMA(HTTPProvider):
|
|||||||
dx_call=source_spot["ACTIVATOR"].upper(),
|
dx_call=source_spot["ACTIVATOR"].upper(),
|
||||||
de_call=source_spot["SPOTTER"].upper(),
|
de_call=source_spot["SPOTTER"].upper(),
|
||||||
freq=float(source_spot["QRG"]) if (source_spot["QRG"] != "") else None, # Seen GMA spots with no frequency
|
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"],
|
comment=source_spot["TEXT"],
|
||||||
sig_refs=[source_spot["REF"]],
|
sig_refs=[source_spot["REF"]],
|
||||||
sig_refs_names=[source_spot["NAME"]],
|
sig_refs_names=[source_spot["NAME"]],
|
||||||
|
|||||||
@@ -46,7 +46,10 @@
|
|||||||
<p><a href="#" onclick="hideInfo()">« Back to the spots table</a></p>
|
<p><a href="#" onclick="hideInfo()">« Back to the spots table</a></p>
|
||||||
</div>
|
</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>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ $.getJSON('/api/spots', function(jsonData) {
|
|||||||
table.find('tbody').append($tr);
|
table.find('tbody').append($tr);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#table-container').html(table);
|
$('#table-container-inner').html(table);
|
||||||
});
|
});
|
||||||
|
|
||||||
function escapeHtml(str) {
|
function escapeHtml(str) {
|
||||||
|
|||||||
Reference in New Issue
Block a user