mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 14:27:42 +00:00
Compare commits
12
Commits
14e4886c1b
...
2.0.4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8451ca2727 | ||
|
|
7ae77e9fb2 | ||
|
|
c3a360e691 | ||
|
|
2a4190ec4a | ||
|
|
c71c0e9d75 | ||
|
|
f2ef6e93fa | ||
|
|
d63897f8ad | ||
|
|
02e2730e47 | ||
|
|
b2719d2cd6 | ||
|
|
b9268dd4ca | ||
|
|
0cce38b0ab | ||
|
|
5a77248dbc |
+5
-3
@@ -68,7 +68,7 @@ spot_providers:
|
||||
- class: "DXCluster"
|
||||
# Clusters have a "name" property in case you want to say which cluster node the data is from, or connect to
|
||||
# several clusters and name them separately. The name will be used as the "source" field for the spots received.
|
||||
name: "HRD Cluster"
|
||||
name: "Cluster"
|
||||
enabled: true
|
||||
host: "hrd.wa9pie.net"
|
||||
port: 8000
|
||||
@@ -84,7 +84,7 @@ spot_providers:
|
||||
allow_rbn_spots: false
|
||||
|
||||
- class: "DXCluster"
|
||||
name: "W3LPL Cluster"
|
||||
name: "Cluster"
|
||||
enabled: false
|
||||
host: "w3lpl.net"
|
||||
port: 7373
|
||||
@@ -345,4 +345,6 @@ web_ui_options:
|
||||
# (home) page, although being arbitrary HTML you can also use a div with absolute, relative, float placement etc. This
|
||||
# is designed for a "donate/support the server" type button, though you are free to do whatever you want with it.
|
||||
# As the server owner you are responsible for the safe usage of this option!
|
||||
support_button_html: ""
|
||||
support_button_html: ""
|
||||
# CartoDB API key. Required to use the CartoDB layers without watermark. Get one from https://carto.com/basemaps/apikey/.
|
||||
cartodb_api_key: ""
|
||||
+2
-2
@@ -3,7 +3,7 @@ from data.band import Band
|
||||
from data.sig import SIG
|
||||
|
||||
# General software
|
||||
SOFTWARE_VERSION = "2.0"
|
||||
SOFTWARE_VERSION = "2.0.4"
|
||||
|
||||
# HTTP headers used for spot providers that use HTTP
|
||||
HTTP_HEADERS = {"User-Agent": f"Spothole v{SOFTWARE_VERSION} (operated by {SERVER_OWNER_CALLSIGN})"}
|
||||
@@ -54,7 +54,7 @@ SIGS = [
|
||||
ref_regex=r"[A-Z]{2}\-\d{3}",
|
||||
),
|
||||
SIG(
|
||||
name="GMA Island",
|
||||
name="GMA Islands",
|
||||
comment_names=[],
|
||||
description="Global Mountain Activity - Islands",
|
||||
ref_regex=r"(([A-Z]{2}\-\d{3})|([A-Z0-9]{1,3}\/[A-Z]{2}\-\d{3}))",
|
||||
|
||||
@@ -20,7 +20,7 @@ POLL_INTERVAL = 7200
|
||||
# To avoid looking up all stations in the GIRO system and working out which ones are providing live data, this has been
|
||||
# manually determined and a CSV provided of all the stations that we can query for live data.
|
||||
STATIONS_INDEX = "datafiles/didbase-stations.csv"
|
||||
LGDC_URL = "https://lgdc.uml.edu/common/DIDBGetValues"
|
||||
LGDC_URL = "https://lgdc.uml.edu/fastchar/getbest"
|
||||
HISTORY_HOURS = 24
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ class GIROIonosonde(SolarConditionsProvider):
|
||||
|
||||
from_str = from_time.strftime("%Y.%m.%d+%H:%M:%S")
|
||||
to_str = to_time.strftime("%Y.%m.%d+%H:%M:%S")
|
||||
url = f"{LGDC_URL}?ursiCode={ursi}&charName=foF2,MUFD,fmin&DMUF=3000&fromDate={from_str}&toDate={to_str}"
|
||||
url = f"{LGDC_URL}?ursiCode={ursi}&charName=foF2,MUF%28D%29,fmin&DMUF=3000&fromDate={from_str}&toDate={to_str}"
|
||||
try:
|
||||
http_response = requests.get(url, headers=HTTP_HEADERS, timeout=(5, 15))
|
||||
if not http_response.ok:
|
||||
|
||||
@@ -118,8 +118,8 @@ class GMA(HTTPSpotProvider):
|
||||
spot.sig_refs[0].sig = "IOTA"
|
||||
spot.sig = "IOTA"
|
||||
case "GMA Island":
|
||||
spot.sig_refs[0].sig = "GMA Island"
|
||||
spot.sig = "GMA Island"
|
||||
spot.sig_refs[0].sig = "GMA Islands"
|
||||
spot.sig = "GMA Islands"
|
||||
case "Lighthouse (ILLW)":
|
||||
spot.sig_refs[0].sig = "ILLW"
|
||||
spot.sig = "ILLW"
|
||||
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
[project]
|
||||
name = "Spothole"
|
||||
version = "2.0"
|
||||
name = "spothole"
|
||||
version = "2.0.4"
|
||||
authors = [
|
||||
{ name="Ian Renton", email="ian@ianrenton.com" },
|
||||
{ name = "Ian Renton", email = "ian@ianrenton.com" },
|
||||
]
|
||||
description = "Spothole is a utility to aggregate \"spots\" from amateur radio DX clusters and xOTA spotting sites, and provide an open JSON API as well as a website to browse the data."
|
||||
readme = "README.md"
|
||||
|
||||
@@ -160,7 +160,6 @@ class WebServer:
|
||||
V1APISpotHandler,
|
||||
{
|
||||
"spots": self._data_store.spots,
|
||||
"spot_providers": self._data_providers,
|
||||
**handler_opts,
|
||||
},
|
||||
),
|
||||
|
||||
+6
-2
@@ -394,9 +394,11 @@ function setBasemap(basemapname) {
|
||||
}
|
||||
// OpenStreetMap.Mapnik.Dark is a synthetic variant that uses Mapnik tiles with a CSS filter applied
|
||||
const providerName = basemapname === "OpenStreetMap.Mapnik.Dark" ? "OpenStreetMap.Mapnik" : basemapname;
|
||||
const isCartoDB = basemapname === "CartoDB.Voyager" || basemapname === "CartoDB.DarkMatter";
|
||||
backgroundTileLayer = L.tileLayer.provider(providerName, {
|
||||
opacity: parseFloat($("#basemapOpacity").val()),
|
||||
edgeBufferTiles: 1
|
||||
edgeBufferTiles: 1,
|
||||
key: isCartoDB ? CARTODB_API_KEY : null
|
||||
});
|
||||
backgroundTileLayer.addTo(map);
|
||||
backgroundTileLayer.bringToBack();
|
||||
@@ -529,9 +531,11 @@ function setUpMap() {
|
||||
// Add basemap
|
||||
loadedBasemap = $("#basemap").val();
|
||||
const initialProviderName = loadedBasemap === "OpenStreetMap.Mapnik.Dark" ? "OpenStreetMap.Mapnik" : loadedBasemap;
|
||||
const isCartoDB = loadedBasemap === "CartoDB.Voyager" || loadedBasemap === "CartoDB.DarkMatter";
|
||||
backgroundTileLayer = L.tileLayer.provider(initialProviderName, {
|
||||
opacity: parseFloat($("#basemapOpacity").val()),
|
||||
edgeBufferTiles: 1
|
||||
edgeBufferTiles: 1,
|
||||
key: isCartoDB ? CARTODB_API_KEY : null
|
||||
});
|
||||
backgroundTileLayer.addTo(map);
|
||||
backgroundTileLayer.bringToBack();
|
||||
|
||||
@@ -40,7 +40,7 @@ function setHamHFBandToggles() {
|
||||
|
||||
// Generate SIGs filter card. This one is also a special case.
|
||||
function generateSIGsMultiToggleFilterCard(sig_options) {
|
||||
const $grid = $('<div class="row row-cols-2 row-cols-xxl-3 g-1 mb-1">');
|
||||
const $grid = $('<div class="row row-cols-2 g-1 mb-1">');
|
||||
sig_options.forEach(o => {
|
||||
const domSafeName = o["name"].replace(/^[^A-Za-z0-9]+|[^\w]+/gi, "");
|
||||
$grid.append(`<div class="col"><div class="form-check"><input type="checkbox" class="form-check-input filter-button-sig storeable-checkbox" id="filter-button-sig-${domSafeName}" value="${o['name']}" autocomplete="off" onClick="filtersUpdated()" checked><label class="form-check-label" id="filter-button-label-sig-${domSafeName}" for="filter-button-sig-${domSafeName}" title="${o['description']}"><i class="fa-solid ${sigToIcon(o['name'], 'fa-tower-cell')}"></i> ${o['name']}</label></div></div>`);
|
||||
|
||||
+2
-2
@@ -345,7 +345,7 @@ const SIG_ICONS = {
|
||||
"SOTA": "fa-mountain-sun",
|
||||
"WWFF": "fa-seedling",
|
||||
"GMA": "fa-person-hiking",
|
||||
"GMA Island": "fa-person-hiking",
|
||||
"GMA Islands": "fa-person-hiking",
|
||||
"WWBOTA": "fa-radiation",
|
||||
"HEMA": "fa-mound",
|
||||
"IOTA": "fa-book-atlas",
|
||||
@@ -373,7 +373,7 @@ const SIG_NAMES = {
|
||||
"SOTA": "Summits on the Air",
|
||||
"WWFF": "Worldwide Flora & Fauna",
|
||||
"GMA": "Global Mountain Activity",
|
||||
"GMA Island": "Global Mountain Activity - Islands",
|
||||
"GMA Islands": "Global Mountain Activity - Islands",
|
||||
"WWBOTA": "Bunkers on the Air",
|
||||
"HEMA": "Humps Excluding Marilyns Award",
|
||||
"IOTA": "Islands on the Air",
|
||||
|
||||
+3
-2
@@ -801,12 +801,13 @@
|
||||
}
|
||||
},
|
||||
CartoDB: {
|
||||
url: 'https://{s}.basemaps.cartocdn.com/{variant}/{z}/{x}/{y}{r}.png',
|
||||
url: 'https://{s}.basemaps.cartocdn.com/{variant}/{z}/{x}/{y}{r}.png?key={key}',
|
||||
options: {
|
||||
attribution: '{attribution.OpenStreetMap} © <a href="https://carto.com/attributions">CARTO</a>',
|
||||
subdomains: 'abcd',
|
||||
maxZoom: 20,
|
||||
variant: 'light_all'
|
||||
variant: 'light_all',
|
||||
key: '<insert your API key here>'
|
||||
},
|
||||
variants: {
|
||||
Positron: 'light_all',
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/static/js/add-spot.js?v=1787382663"></script>
|
||||
<script src="/static/js/add-spot.js?v=1787989211"></script>
|
||||
<script>$(document).ready(function () {
|
||||
$("#nav-link-add-spot").addClass("active");
|
||||
}); <!-- highlight active page in nav --></script>
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/static/js/alerts.js?v=1787382663"></script>
|
||||
<script src="/static/js/alerts.js?v=1787989211"></script>
|
||||
<script>$(document).ready(function () {
|
||||
$("#nav-link-alerts").addClass("active");
|
||||
}); <!-- highlight active page in nav --></script>
|
||||
|
||||
@@ -76,8 +76,8 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/static/js/spotsbandsandmap.js?v=1787382663"></script>
|
||||
<script src="/static/js/bands.js?v=1787382663"></script>
|
||||
<script src="/static/js/spotsbandsandmap.js?v=1787989211"></script>
|
||||
<script src="/static/js/bands.js?v=1787989211"></script>
|
||||
<script>$(document).ready(function () {
|
||||
$("#nav-link-bands").addClass("active");
|
||||
}); <!-- highlight active page in nav --></script>
|
||||
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
{% extends "skeleton.html" %}
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/css/style.css?v=1787382663" type="text/css">
|
||||
<link rel="stylesheet" href="/static/css/style.css?v=1787989211" type="text/css">
|
||||
<link href="/static/vendor/css/bootstrap-5.3.8.min.css" rel="stylesheet">
|
||||
<link href="/static/vendor/css/fontawesome-6.7.2.min.css" rel="stylesheet">
|
||||
<link href="/static/vendor/css/solid-6.7.2.min.css" rel="stylesheet">
|
||||
@@ -15,10 +15,10 @@
|
||||
window.fetchEventSource = fetchEventSource;
|
||||
</script>
|
||||
|
||||
<script src="/static/js/utils.js?v=1787382663"></script>
|
||||
<script src="/static/js/ui-ham.js?v=1787382663"></script>
|
||||
<script src="/static/js/geo.js?v=1787382663"></script>
|
||||
<script src="/static/js/common.js?v=1787382663"></script>
|
||||
<script src="/static/js/utils.js?v=1787989211"></script>
|
||||
<script src="/static/js/ui-ham.js?v=1787989211"></script>
|
||||
<script src="/static/js/geo.js?v=1787989211"></script>
|
||||
<script src="/static/js/common.js?v=1787989211"></script>
|
||||
{% end %}
|
||||
{% block body %}
|
||||
<div class="container">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
oninput="filtersUpdated();" style="width: 5em; display: inline-block;">
|
||||
{% for a in web_ui_options["max_spot_age"] %}
|
||||
<option value="{{a*60}}" {% if web_ui_options[
|
||||
"max_spot_age_default"] == a*60 %}selected{% end %}>{{a}}</option>
|
||||
"max_spot_age_default"] == a %}selected{% end %}>{{a}}</option>
|
||||
{% end %}
|
||||
</select>
|
||||
minutes
|
||||
|
||||
@@ -284,7 +284,7 @@
|
||||
</div>
|
||||
|
||||
<script src="/static/vendor/js/chart-4.4.9.umd.min.js"></script>
|
||||
<script src="/static/js/conditions.js?v=1787382663"></script>
|
||||
<script src="/static/js/conditions.js?v=1787989211"></script>
|
||||
<script>$(document).ready(function () {
|
||||
$("#nav-link-conditions").addClass("active");
|
||||
}); <!-- highlight active page in nav --></script>
|
||||
|
||||
+6
-2
@@ -109,8 +109,12 @@
|
||||
<script src="/static/vendor/js/leaflet-cqzones.js"></script>
|
||||
<script src="/static/vendor/js/leaflet-workedallbritainireland.js" type="module"></script>
|
||||
|
||||
<script src="/static/js/spotsbandsandmap.js?v=1787382663"></script>
|
||||
<script src="/static/js/map.js?v=1787382663"></script>
|
||||
<script>
|
||||
const CARTODB_API_KEY = "{{ web_ui_options.get('cartodb_api_key', '') }}";
|
||||
</script>
|
||||
|
||||
<script src="/static/js/spotsbandsandmap.js?v=1787989211"></script>
|
||||
<script src="/static/js/map.js?v=1787989211"></script>
|
||||
<script>$(document).ready(function () {
|
||||
$("#nav-link-map").addClass("active");
|
||||
}); <!-- highlight active page in nav --></script>
|
||||
|
||||
@@ -113,8 +113,8 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/static/js/spotsbandsandmap.js?v=1787382663"></script>
|
||||
<script src="/static/js/spots.js?v=1787382663"></script>
|
||||
<script src="/static/js/spotsbandsandmap.js?v=1787989211"></script>
|
||||
<script src="/static/js/spots.js?v=1787989211"></script>
|
||||
<script>$(document).ready(function () {
|
||||
$("#nav-link-spots").addClass("active");
|
||||
}); <!-- highlight active page in nav --></script>
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/static/js/status.js?v=1787382663"></script>
|
||||
<script src="/static/js/status.js?v=1787989211"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$("#nav-link-status").addClass("active");
|
||||
|
||||
Reference in New Issue
Block a user