mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 06:17:41 +00:00
Compare commits
4
Commits
8f8ff46426
...
e3df512b9e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e3df512b9e | ||
|
|
ee45a15b4e | ||
|
|
5e56cd3b19 | ||
|
|
04f5df5260 |
@@ -4,5 +4,6 @@ WORKDIR /app
|
||||
COPY . .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
EXPOSE 8080
|
||||
EXPOSE 7373
|
||||
|
||||
CMD ["python3", "spothole.py"]
|
||||
@@ -1,7 +1,7 @@
|
||||
# 
|
||||
|
||||
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.
|
||||
JSON API as well as a website to browse the data, and its own telnet server for integration with desktop loggers.
|
||||
|
||||

|
||||
|
||||
@@ -17,10 +17,8 @@ Spothole itself is also open source, Public Domain licenced code that anyone can
|
||||
|
||||
Supported data sources include DX Clusters, the Reverse Beacon Network (RBN), the APRS Internet Service (APRS-IS), POTA,
|
||||
SOTA, WWFF, GMA, WWBOTA, HEMA, Parks 'n' Peaks, ZLOTA, WOTA, BOTA, LLOTA, WWTOTA, Tiles on the Air, the UK Packet
|
||||
Repeater Network, NG3K, and any site based on the xOTA software by nischu.
|
||||
|
||||
Additional Special Interest Groups (SIGs) without their own specific data source include KRMNPA, SANPCPA, WAB, WAI and
|
||||
DME.
|
||||
Repeater Network, NG3K, and any site based on the xOTA software by nischu. It also integrates with QRZ.com and HamQTH,
|
||||
retrieves solar data from various sources, provides information about upcoming contests, and more.
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -17,6 +17,15 @@ api_only_mode: false
|
||||
# The base URL at which the software runs.
|
||||
base_url: "http://localhost:8080"
|
||||
|
||||
# Whether to run a telnet spot server as well as the web interface
|
||||
telnet_server_enabled: false
|
||||
|
||||
# Telnet server address. This is not really needed by the software itself, just displayed in documentation.
|
||||
telnet_server_address: "localhost"
|
||||
|
||||
# Port to run the telnet server on
|
||||
telnet_server_port: 7373
|
||||
|
||||
# Spot providers to use. This is an example set, tailor it to your liking by commenting and uncommenting.
|
||||
# RBN and APRS-IS are supported but have such a high data rate, you probably don't want them enabled.
|
||||
# Each provider needs a class and an enabled/disabled state. Some require more config such as hostnames/IP
|
||||
|
||||
@@ -24,6 +24,9 @@ MAX_SPOT_AGE = config.get("max_spot_age_sec", 3600)
|
||||
MAX_ALERT_AGE = config.get("max_alert_age_sec", 604800)
|
||||
SERVER_OWNER_CALLSIGN = config.get("server_owner_callsign", "N0CALL")
|
||||
WEB_SERVER_PORT = config.get("web_server_port", 8080)
|
||||
TELNET_SERVER_ENABLED = config.get("telnet_server_enabled", False)
|
||||
TELNET_SERVER_ADDRESS = config.get("telnet_server_address", "localhost")
|
||||
TELNET_SERVER_PORT = config.get("telnet_server_port", 7373)
|
||||
ALLOW_SPOTTING = config.get("allow_spotting", True)
|
||||
ALLOW_UPSTREAM_SPOTTING = config.get("allow_upstream_spotting", True)
|
||||
WEB_UI_OPTIONS = config.get("web_ui_options", {})
|
||||
|
||||
@@ -11,7 +11,7 @@ from core.constants import SOFTWARE_VERSION
|
||||
from core.data_providers import DATA_PROVIDERS
|
||||
from core.data_store import DATA_STORE
|
||||
from core.prometheus_metrics_handler import alerts_gauge, memory_use_gauge, spots_gauge
|
||||
from server.webserver import WEB_SERVER
|
||||
from webserver.webserver import WEB_SERVER
|
||||
|
||||
|
||||
class StatusReporter:
|
||||
|
||||
@@ -13,6 +13,7 @@ services:
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8080:8080"
|
||||
- "7373:7373" # For telnet if required
|
||||
volumes:
|
||||
- ./config.yml:/app/config.yml
|
||||
- ./cache:/app/cache
|
||||
|
||||
+4
-1
@@ -16,9 +16,12 @@ To navigate your way around the source code, this list may help.
|
||||
* `/providers/solarconditions` - Classes providing solar and propagation by accessing the APIs of other services
|
||||
* `/providers/staticdata` - Classes providing static lookup data by accessing bundled data files or the APIs of other
|
||||
services
|
||||
* `/providers/callsign` - Classes providing callsign lookup data by accessing bundled data files or the APIs of other
|
||||
services
|
||||
* `/providers/sigrefdata` - Classes providing SIG reference lookup data by accessing bundled data files or the APIs of
|
||||
other services
|
||||
* `/server` - Classes for running Spothole's own web server
|
||||
* `/webserver` - Classes for running Spothole's own web server
|
||||
* `/telnetserver` - Classes for running Spothole's telnet server
|
||||
* `spothole.py` - Main application script
|
||||
|
||||
*Templates*
|
||||
|
||||
@@ -22,11 +22,18 @@ class Hamsat(HTTPAlertProvider):
|
||||
# Iterate through source data
|
||||
for source_alert in http_response.json()["data"]:
|
||||
# Convert to our alert format
|
||||
freqs_modes = source_alert.get("mode", "")
|
||||
if "mhz" in source_alert:
|
||||
if "mhz_direction" in source_alert:
|
||||
freqs_modes = f"{source_alert['mhz']!s} {source_alert['mhz_direction']}, {freqs_modes}"
|
||||
else:
|
||||
freqs_modes = f"{source_alert['mhz']!s}, {freqs_modes}"
|
||||
|
||||
alert = Alert(
|
||||
source=self.name,
|
||||
source_id=source_alert["id"],
|
||||
dx_calls=[source_alert["callsign"].upper()],
|
||||
freqs_modes=f"{source_alert['mhz']!s} {source_alert['mhz_direction']}, {source_alert['mode']}",
|
||||
freqs_modes=freqs_modes,
|
||||
comment=source_alert["comment"],
|
||||
# Fudge a SIG ref to provide the remaining bits of data we need: the satellite and the operator's grid
|
||||
sig_refs=[
|
||||
|
||||
+8
-2
@@ -5,12 +5,13 @@ import signal
|
||||
import sys
|
||||
|
||||
from core.cleanup import CLEANUP_TIMER
|
||||
from core.config import LOG_LEVEL, SERVER_OWNER_CALLSIGN
|
||||
from core.config import LOG_LEVEL, SERVER_OWNER_CALLSIGN, TELNET_SERVER_ENABLED, TELNET_SERVER_PORT
|
||||
from core.constants import SOFTWARE_VERSION
|
||||
from core.data_providers import DATA_PROVIDERS
|
||||
from core.data_store import DATA_STORE
|
||||
from core.status_reporter import StatusReporter
|
||||
from server.webserver import WEB_SERVER
|
||||
from telnetserver.telnetserver import TELNET_SERVER
|
||||
from webserver.webserver import WEB_SERVER
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -20,6 +21,7 @@ def shutdown(_signum=None, _frame=None):
|
||||
|
||||
logger.info("Stopping program...")
|
||||
WEB_SERVER.stop()
|
||||
TELNET_SERVER.stop()
|
||||
DATA_PROVIDERS.stop()
|
||||
CLEANUP_TIMER.stop()
|
||||
DATA_STORE.close()
|
||||
@@ -60,6 +62,10 @@ if __name__ == "__main__":
|
||||
# Set up the web server
|
||||
WEB_SERVER.setup()
|
||||
|
||||
# Run the telnet server
|
||||
if TELNET_SERVER_ENABLED:
|
||||
TELNET_SERVER.start(port=TELNET_SERVER_PORT)
|
||||
|
||||
# Run the web server. This is the blocking call that keeps the application running in the main thread, so this must
|
||||
# be the last thing we do. web_server.stop() triggers an await condition in the web server which finishes the main
|
||||
# thread.
|
||||
|
||||
+37
-13
@@ -54,7 +54,7 @@ function updateTable() {
|
||||
const showDX = $("#tableShowDX")[0].checked;
|
||||
const showFreqsModes = $("#tableShowFreqsModes")[0].checked;
|
||||
const showComment = $("#tableShowComment")[0].checked;
|
||||
const showSource = $("#tableShowSource")[0].checked;
|
||||
const showType = $("#tableShowType")[0].checked;
|
||||
const showRef = $("#tableShowRef")[0].checked;
|
||||
|
||||
// Populate table with headers
|
||||
@@ -75,8 +75,8 @@ function updateTable() {
|
||||
if (showComment) {
|
||||
table.find('thead tr').append(`<th class='bg-primary-subtle hideonmobile'>Comment</th>`);
|
||||
}
|
||||
if (showSource) {
|
||||
table.find('thead tr').append(`<th class='bg-primary-subtle hideonmobile'>Source</th>`);
|
||||
if (showType) {
|
||||
table.find('thead tr').append(`<th class='bg-primary-subtle hideonmobile'>Type</th>`);
|
||||
}
|
||||
if (showRef) {
|
||||
table.find('thead tr').append(`<th class='bg-primary-subtle hideonmobile'>Ref.</th>`);
|
||||
@@ -151,7 +151,7 @@ function addAlertRowsToTable(tbody, alerts) {
|
||||
const showDX = $("#tableShowDX")[0].checked;
|
||||
const showFreqsModes = $("#tableShowFreqsModes")[0].checked;
|
||||
const showComment = $("#tableShowComment")[0].checked;
|
||||
const showSource = $("#tableShowSource")[0].checked;
|
||||
const showType = $("#tableShowType")[0].checked;
|
||||
const showRef = $("#tableShowRef")[0].checked;
|
||||
|
||||
// Get times for the alert, and convert to local time if necessary.
|
||||
@@ -232,14 +232,38 @@ function addAlertRowsToTable(tbody, alerts) {
|
||||
if (a["comment"] != null) {
|
||||
commentText = escapeHtml(a["comment"]);
|
||||
}
|
||||
if (a["url"] != null) {
|
||||
commentText += ` <a href="${escapeHtml(a['url'])}" target="_new" style="text-decoration: none">🔗</a>`;
|
||||
|
||||
// Format extra text, like URL and attribution
|
||||
let subComment = a["url"] != null || a["source"] === "NG3K" || a["source"] === "WA7BNM Contest Calendar";
|
||||
if (subComment) {
|
||||
let subCommentText = ""
|
||||
if (a["url"] != null) {
|
||||
subCommentText += `<a href="${escapeHtml(a['url'])}" target="_new" style="text-decoration: none">More info</a>`;
|
||||
}
|
||||
if ((a["source"] === "NG3K" || a["source"] === "WA7BNM Contest Calendar")) {
|
||||
if (subCommentText !== "") {
|
||||
subCommentText += " | ";
|
||||
}
|
||||
subCommentText += `From ${a["source"]}`;
|
||||
}
|
||||
commentText += `<div class="mt-2 small text-secondary">${subCommentText}</div>`;
|
||||
}
|
||||
|
||||
// Sig or fallback to source
|
||||
let sigSourceText = a["source"];
|
||||
if (a["sig"]) {
|
||||
sigSourceText = a["sig"];
|
||||
|
||||
// Type, SIG or fallback to source
|
||||
let sigTypeText = a["source"];
|
||||
if (a["alert_type"] === "CONTEST") {
|
||||
sigTypeText = "Contest";
|
||||
} else if (a["alert_type"] === "DXPEDITION") {
|
||||
sigTypeText = "DXpedition";
|
||||
} else if (a["alert_type"] === "SATELLITE") {
|
||||
sigTypeText = "Satellite";
|
||||
} else if (a["alert_type"] === "XOTA") {
|
||||
if (a["sig"]) {
|
||||
sigTypeText = a["sig"];
|
||||
} else {
|
||||
sigTypeText = "xOTA";
|
||||
}
|
||||
}
|
||||
|
||||
// Format sig_refs
|
||||
@@ -272,8 +296,8 @@ function addAlertRowsToTable(tbody, alerts) {
|
||||
if (showComment) {
|
||||
$tr.append(`<td class='hideonmobile'>${commentText}</td>`);
|
||||
}
|
||||
if (showSource) {
|
||||
$tr.append(`<td class='nowrap hideonmobile'><span class='icon-wrapper'><i class='fa-solid ${a["icon"]}'></i></span> ${sigSourceText}</td>`);
|
||||
if (showType) {
|
||||
$tr.append(`<td class='nowrap hideonmobile'><span class='icon-wrapper'><i class='fa-solid ${a["icon"]}'></i></span> ${sigTypeText}</td>`);
|
||||
}
|
||||
if (showRef) {
|
||||
$tr.append(`<td class='hideonmobile'>${sig_refs}</td>`);
|
||||
@@ -290,7 +314,7 @@ function addAlertRowsToTable(tbody, alerts) {
|
||||
}
|
||||
|
||||
const $td2 = $("<td colspan='100'>");
|
||||
if (showSource) {
|
||||
if (showType) {
|
||||
$td2.append(`<span class='icon-wrapper'><i class='fa-solid ${a["icon"]}'></i></span> `);
|
||||
}
|
||||
if (showRef) {
|
||||
|
||||
@@ -538,6 +538,15 @@ function displayIntroBox() {
|
||||
$("#intro-box-dismiss").click(function () {
|
||||
localStorage.setItem("intro-box-dismissed", true);
|
||||
});
|
||||
|
||||
// Do the same with the "telnet" intro box, but only show it if the user has dismissed the normal intro box once,
|
||||
// to avoid two boxes on first page load.
|
||||
if (localStorage.getItem("intro-box-telnet-dismissed") == null && localStorage.getItem("intro-box-dismissed") != null) {
|
||||
$("#intro-box-telnet").show();
|
||||
}
|
||||
$("#intro-box-telnet-dismiss").click(function () {
|
||||
localStorage.setItem("intro-box-telnet-dismissed", true);
|
||||
});
|
||||
}
|
||||
|
||||
// Mark a callsign-band-mode combination as worked (or unmark it). Persist this to localStorage.
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
import asyncio
|
||||
import logging
|
||||
import threading
|
||||
from datetime import datetime
|
||||
|
||||
import pytz
|
||||
|
||||
from core.config import SERVER_OWNER_CALLSIGN
|
||||
from core.constants import SOFTWARE_VERSION
|
||||
from core.data_store import DATA_STORE
|
||||
from data.spot import Spot
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class TelnetServer:
|
||||
"""A telnet server designed to provide spots in the same format as DXSpider, for compatibility with desktop loggers."""
|
||||
|
||||
def __init__(self):
|
||||
self._port = None
|
||||
self._running = False
|
||||
self._clients = set()
|
||||
self._loop = None
|
||||
|
||||
def start(self, port=7373):
|
||||
"""Starts the telnet server"""
|
||||
|
||||
self._port = port
|
||||
|
||||
# Start telnet server on the async loop
|
||||
def run_loop():
|
||||
self._loop = asyncio.new_event_loop()
|
||||
asyncio.set_event_loop(self._loop)
|
||||
self._loop.run_until_complete(self._start_internal())
|
||||
self._loop.run_forever()
|
||||
|
||||
# Start the network thread as a daemon so it exits cleanly when the main script stops
|
||||
t = threading.Thread(target=run_loop, daemon=True)
|
||||
t.start()
|
||||
logger.debug("Telnet server background thread spawned")
|
||||
|
||||
# Listen for new spots and alerts being added to the cache, so we can notify SSE clients immediately
|
||||
DATA_STORE.spots.add_listener(self.publish)
|
||||
self._running = True
|
||||
|
||||
async def _start_internal(self):
|
||||
logger.info(f"Telnet server listening on port {self._port}")
|
||||
await asyncio.start_server(self._handle_client, "0.0.0.0", self._port)
|
||||
|
||||
async def _handle_client(self, reader, writer):
|
||||
"""Handles a new client connection"""
|
||||
|
||||
logger.debug("Telnet client connected")
|
||||
self._clients.add(writer)
|
||||
|
||||
# Print MOTD
|
||||
try:
|
||||
motd = (
|
||||
f"Welcome to Spothole v{SOFTWARE_VERSION}.\r\nThis server is run by {SERVER_OWNER_CALLSIGN}.\r\n===\r\n"
|
||||
)
|
||||
writer.write(motd.encode("ascii"))
|
||||
await writer.drain()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# Set up buffer for user input
|
||||
input_buffer = ""
|
||||
|
||||
try:
|
||||
# Read forever, picking out any commands. Currently we just support "exit"
|
||||
while True:
|
||||
data = await reader.read(1024)
|
||||
if not data:
|
||||
break
|
||||
|
||||
text = data.decode("ascii", errors="ignore")
|
||||
|
||||
for char in text:
|
||||
if char in ("\r", "\n"):
|
||||
# User pressed Enter, evaluate the command
|
||||
command = input_buffer.strip().lower()
|
||||
input_buffer = ""
|
||||
|
||||
if command == "exit":
|
||||
writer.write(b"Goodbye!\r\n")
|
||||
await writer.drain()
|
||||
# Exit the while read loop, this will disconnect the client.
|
||||
return
|
||||
|
||||
elif char in ("\b", "\x7f"):
|
||||
# Handle backspaces
|
||||
input_buffer = input_buffer[:-1]
|
||||
else:
|
||||
input_buffer += char
|
||||
|
||||
except asyncio.CancelledError:
|
||||
pass
|
||||
except Exception:
|
||||
logger.exception("Exception handling telnet client")
|
||||
finally:
|
||||
logger.debug("Telnet client disconnected")
|
||||
self._clients.remove(writer)
|
||||
writer.close()
|
||||
await writer.wait_closed()
|
||||
|
||||
def stop(self):
|
||||
"""Stops the telnet server"""
|
||||
|
||||
if self._loop and self._loop.is_running():
|
||||
logger.debug("Stopping telnet server...")
|
||||
self._loop.call_soon_threadsafe(self._loop.stop)
|
||||
|
||||
async def _stop_internal(self):
|
||||
"""Stops the telnet server"""
|
||||
|
||||
for writer in list(self._clients):
|
||||
try:
|
||||
writer.close()
|
||||
await writer.wait_closed()
|
||||
except Exception:
|
||||
pass
|
||||
self._clients.clear()
|
||||
|
||||
def publish(self, spot: Spot):
|
||||
"""Callback from the data store when a spot is added"""
|
||||
|
||||
if self._running and self._clients and self._loop and self._loop.is_running():
|
||||
asyncio.run_coroutine_threadsafe(self._broadcast_spot_internal(spot), self._loop)
|
||||
|
||||
async def _broadcast_spot_internal(self, spot: Spot):
|
||||
"""Internal version, run on async loop for thread safety?"""
|
||||
|
||||
# Ensure ASCII formatting for telnet clients
|
||||
encoded_line = self._format_dxspider_spot(spot).encode("ascii", errors="ignore")
|
||||
|
||||
# Try to write to all clients, and in the process find the ones that are disconnected
|
||||
disconnected_clients = set()
|
||||
for writer in self._clients:
|
||||
try:
|
||||
writer.write(encoded_line)
|
||||
await writer.drain()
|
||||
except Exception:
|
||||
disconnected_clients.add(writer)
|
||||
|
||||
# Clean up any disconnected connections caught during writing
|
||||
for writer in disconnected_clients:
|
||||
self._clients.discard(writer)
|
||||
|
||||
@staticmethod
|
||||
def _format_dxspider_spot(spot: Spot) -> str:
|
||||
"""Formats a spot into the format DXspider uses:
|
||||
DX de CALLSIGN: FREQUENCY DX_CALLSIGN COMMENTS TIME_UTC"""
|
||||
|
||||
de_call = f"{spot.de_call + ':' if spot.de_call else '???:'!s:<9}"
|
||||
frequency = f"{(spot.freq / 1000.0):8.1f}"
|
||||
dx_call = f"{spot.dx_call!s:<12}"
|
||||
comment = f"{spot.comment[:29]:<30}"
|
||||
if spot.time:
|
||||
timestamp = datetime.fromtimestamp(spot.time, tz=pytz.utc).strftime("%H%M") + "Z"
|
||||
else:
|
||||
timestamp = datetime.now(tz=pytz.utc).strftime("%H%M") + "Z"
|
||||
|
||||
# Combine into classic DXSpider output string followed by network line breaks
|
||||
return f"DX de {de_call} {frequency} {dx_call} {comment} {timestamp}\r\n"
|
||||
|
||||
|
||||
# Global object
|
||||
TELNET_SERVER = TelnetServer()
|
||||
+13
-1
@@ -34,6 +34,13 @@
|
||||
like. The usage is explained in more detail in the <a
|
||||
href="https://git.ianrenton.com/ian/spothole/src/branch/main/README.md">README file</a>.
|
||||
</li>
|
||||
{% if telnet_server_enabled %}
|
||||
<li>You can use it as a traditional telnet-based source of spots, similar to DXSpider and other software, <b>in
|
||||
your desktop logging application</b>. To do this, set up your logger with the server address
|
||||
<code>{{ telnet_server_address }}</code> and port <code>{{ telnet_server_port }}</code>. You can also access
|
||||
it from a terminal with <code>telnet {{ telnet_server_address }} {{ telnet_server_port }}</code>.
|
||||
</li>
|
||||
{% end %}
|
||||
<li>You can <b>write your own client using the Spothole API</b>, using the main Spothole instance to provide
|
||||
data, and do whatever you like with it. The README contains guidance on how to do this, and the full API
|
||||
docs are linked above. You can also find reference implementations in the form of Spothole's own web-based
|
||||
@@ -85,7 +92,8 @@
|
||||
<p>Spothole can retrieve alerts from: <a href="https://www.ng3k.com/">NG3K</a>, <a href="https://pota.app">POTA</a>,
|
||||
<a href="https://www.sota.org.uk/">SOTA</a>, <a href="https://wwff.co/">WWFF</a>, <a
|
||||
href="https://www.parksnpeaks.org/">Parks 'n' Peaks</a>, <a href="https://www.wota.org.uk/">WOTA</a> and
|
||||
<a href="https://www.beachesontheair.com/">BOTA</a>.</p>
|
||||
<a href="https://www.beachesontheair.com/">BOTA</a>. It also fetches contest dates from
|
||||
<a href="https://contestcalendar.com/">WA7BNM Contest Calendar</a> and RSGB contest calendars.</p>
|
||||
<p>Spothole can retrieve solar and propagation condition data from <a href="https://www.hamqsl.com">HamQSL</a>, the
|
||||
<a href="https://www.swpc.noaa.gov/">NOAA Space Weather Prediction Center</a>, the <a
|
||||
href="https://giro.uml.edu/">Lowell GIRO Data Center</a> and <a href="https://prop.kc2g.com/">prop.kc2g.com</a>
|
||||
@@ -162,6 +170,10 @@
|
||||
modify it however you like, you can claim you wrote it and charge people £1000 for a copy, I don't really mind.
|
||||
(Please don't do the last one. But if you're using my code for something cool, it would be nice to hear from
|
||||
you!)</p>
|
||||
<h4 class="mt-4">What commands are supported in the telnet server?</h4>
|
||||
<p>Currently, <code>exit</code>, and nothing else. Support for some DXSpider-like commands may be added to Spothole
|
||||
in due course, but at the moment if you want to add Spothole as a telnet cluster data source to your desktop
|
||||
logging application, that application must handle filtering itself.</p>
|
||||
<h2 id="accuracy" class="mt-4">Data Accuracy</h2>
|
||||
<p>Please note that the data coming out of Spothole is only as good as the data going in. People mis-hear and make
|
||||
typos when spotting callsigns all the time. There are also plenty of cases where Spothole's data, particularly
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/static/js/add-spot.js?v=1789116473"></script>
|
||||
<script src="/static/js/add-spot.js?v=1789140190"></script>
|
||||
<script>$(document).ready(function () {
|
||||
$("#nav-link-add-spot").addClass("active");
|
||||
}); <!-- highlight active page in nav --></script>
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/static/js/alerts.js?v=1789116474"></script>
|
||||
<script src="/static/js/alerts.js?v=1789140190"></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=1789116473"></script>
|
||||
<script src="/static/js/bands.js?v=1789116473"></script>
|
||||
<script src="/static/js/spotsbandsandmap.js?v=1789140190"></script>
|
||||
<script src="/static/js/bands.js?v=1789140190"></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=1789116473" type="text/css">
|
||||
<link rel="stylesheet" href="/static/css/style.css?v=1789140190" 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">
|
||||
@@ -16,10 +16,10 @@
|
||||
window.fetchEventSource = fetchEventSource;
|
||||
</script>
|
||||
|
||||
<script src="/static/js/utils.js?v=1789116473"></script>
|
||||
<script src="/static/js/ui-ham.js?v=1789116473"></script>
|
||||
<script src="/static/js/geo.js?v=1789116473"></script>
|
||||
<script src="/static/js/common.js?v=1789116473"></script>
|
||||
<script src="/static/js/utils.js?v=1789140190"></script>
|
||||
<script src="/static/js/ui-ham.js?v=1789140190"></script>
|
||||
<script src="/static/js/geo.js?v=1789140190"></script>
|
||||
<script src="/static/js/common.js?v=1789140190"></script>
|
||||
{% end %}
|
||||
{% block body %}
|
||||
<div class="container">
|
||||
|
||||
@@ -39,9 +39,9 @@
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input storeable-checkbox" type="checkbox" id="tableShowSource"
|
||||
value="tableShowSource" oninput="columnsUpdated();" checked>
|
||||
<label class="form-check-label" for="tableShowSource">Source</label>
|
||||
<input class="form-check-input storeable-checkbox" type="checkbox" id="tableShowType"
|
||||
value="tableShowType" oninput="columnsUpdated();" checked>
|
||||
<label class="form-check-label" for="tableShowType">Source</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
|
||||
@@ -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=1789116473"></script>
|
||||
<script src="/static/js/conditions.js?v=1789140190"></script>
|
||||
<script>$(document).ready(function () {
|
||||
$("#nav-link-conditions").addClass("active");
|
||||
}); <!-- highlight active page in nav --></script>
|
||||
|
||||
+2
-2
@@ -113,8 +113,8 @@
|
||||
const CARTODB_API_KEY = "{{ web_ui_options.get('cartodb_api_key', '') }}";
|
||||
</script>
|
||||
|
||||
<script src="/static/js/spotsbandsandmap.js?v=1789116474"></script>
|
||||
<script src="/static/js/map.js?v=1789116474"></script>
|
||||
<script src="/static/js/spotsbandsandmap.js?v=1789140190"></script>
|
||||
<script src="/static/js/map.js?v=1789140190"></script>
|
||||
<script>$(document).ready(function () {
|
||||
$("#nav-link-map").addClass("active");
|
||||
}); <!-- highlight active page in nav --></script>
|
||||
|
||||
+14
-2
@@ -14,6 +14,18 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if telnet_server_enabled %}
|
||||
<div id="intro-box-telnet" class="permanently-dismissible-box mt-3">
|
||||
<div class="alert alert-primary alert-dismissible fade show" role="alert">
|
||||
<i class="fa-solid fa-circle-info"></i> <strong>Spothole now has a telnet server!</strong><br/>If you'd like to
|
||||
add Spothole as a source of data to your desktop logging application, now you can. Use server address
|
||||
<code>{{ telnet_server_address }}</code> and port <code>{{ telnet_server_port }}</code>.
|
||||
<button type="button" id="intro-box-telnet-dismiss" class="btn-close" data-bs-dismiss="alert"
|
||||
aria-label="Close"></button>
|
||||
</div>
|
||||
</div>
|
||||
{% end %}
|
||||
|
||||
<div class="mt-3">
|
||||
<div id="settingsButtonRow" class="row mb-3">
|
||||
<div class="col-md-4 mb-3 mb-md-0">
|
||||
@@ -113,8 +125,8 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/static/js/spotsbandsandmap.js?v=1789116473"></script>
|
||||
<script src="/static/js/spots.js?v=1789116473"></script>
|
||||
<script src="/static/js/spotsbandsandmap.js?v=1789140190"></script>
|
||||
<script src="/static/js/spots.js?v=1789140190"></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=1789116473"></script>
|
||||
<script src="/static/js/status.js?v=1789140190"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$("#nav-link-status").addClass("active");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import re
|
||||
|
||||
from server.handlers.api.spots import APISpotsHandler, APISpotsStreamHandler
|
||||
from webserver.handlers.api.spots import APISpotsHandler, APISpotsStreamHandler
|
||||
|
||||
_GRID_SOURCE_RE = re.compile(r'"dx_location_source":\s*"GRID"')
|
||||
_LEGACY_PARAM_TO_HEADER_MAP = {
|
||||
@@ -6,7 +6,15 @@ import tornado
|
||||
from tornado import httputil
|
||||
from tornado.web import Application
|
||||
|
||||
from core.config import ALLOW_SPOTTING, BASE_URL, SERVER_OWNER_CALLSIGN, WEB_UI_OPTIONS
|
||||
from core.config import (
|
||||
ALLOW_SPOTTING,
|
||||
BASE_URL,
|
||||
SERVER_OWNER_CALLSIGN,
|
||||
TELNET_SERVER_ADDRESS,
|
||||
TELNET_SERVER_ENABLED,
|
||||
TELNET_SERVER_PORT,
|
||||
WEB_UI_OPTIONS,
|
||||
)
|
||||
from core.constants import SOFTWARE_VERSION
|
||||
from core.prometheus_metrics_handler import page_requests_counter
|
||||
|
||||
@@ -43,5 +51,8 @@ class PageTemplateHandler(tornado.web.RequestHandler):
|
||||
allow_spotting=ALLOW_SPOTTING,
|
||||
web_ui_options=WEB_UI_OPTIONS,
|
||||
baseurl=BASE_URL,
|
||||
telnet_server_enabled=TELNET_SERVER_ENABLED,
|
||||
telnet_server_address=TELNET_SERVER_ADDRESS,
|
||||
telnet_server_port=TELNET_SERVER_PORT,
|
||||
current_path=self.request.path,
|
||||
)
|
||||
@@ -14,25 +14,25 @@ from core.config import (
|
||||
)
|
||||
from core.data_providers import DATA_PROVIDERS
|
||||
from core.data_store import DATA_STORE
|
||||
from server.handlers.api.addspot import APISpotHandler
|
||||
from server.handlers.api.alerts import APIAlertsHandler, APIAlertsStreamHandler
|
||||
from server.handlers.api.dxstats import APIDxStatsHandler
|
||||
from server.handlers.api.lookups import (
|
||||
from webserver.handlers.api.addspot import APISpotHandler
|
||||
from webserver.handlers.api.alerts import APIAlertsHandler, APIAlertsStreamHandler
|
||||
from webserver.handlers.api.dxstats import APIDxStatsHandler
|
||||
from webserver.handlers.api.lookups import (
|
||||
APILookupCallHandler,
|
||||
APILookupGridHandler,
|
||||
APILookupSIGRefHandler,
|
||||
)
|
||||
from server.handlers.api.options import APIOptionsHandler
|
||||
from server.handlers.api.solar_conditions import APISolarConditionsHandler
|
||||
from server.handlers.api.spots import APISpotsHandler, APISpotsStreamHandler
|
||||
from server.handlers.api.status import APIStatusHandler
|
||||
from server.handlers.api.v1_addspot import V1APISpotHandler
|
||||
from server.handlers.api.v1_compatability import V1RedirectHandler
|
||||
from server.handlers.api.v1_spots import V1APISpotsHandler, V1APISpotsStreamHandler
|
||||
from server.handlers.manifesthandler import ManifestHandler
|
||||
from server.handlers.metrics import PrometheusMetricsHandler
|
||||
from server.handlers.pagetemplate import PageTemplateHandler
|
||||
from server.sse_broadcaster import SSEBroadcaster
|
||||
from webserver.handlers.api.options import APIOptionsHandler
|
||||
from webserver.handlers.api.solar_conditions import APISolarConditionsHandler
|
||||
from webserver.handlers.api.spots import APISpotsHandler, APISpotsStreamHandler
|
||||
from webserver.handlers.api.status import APIStatusHandler
|
||||
from webserver.handlers.api.v1_addspot import V1APISpotHandler
|
||||
from webserver.handlers.api.v1_compatability import V1RedirectHandler
|
||||
from webserver.handlers.api.v1_spots import V1APISpotsHandler, V1APISpotsStreamHandler
|
||||
from webserver.handlers.manifesthandler import ManifestHandler
|
||||
from webserver.handlers.metrics import PrometheusMetricsHandler
|
||||
from webserver.handlers.pagetemplate import PageTemplateHandler
|
||||
from webserver.sse_broadcaster import SSEBroadcaster
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
Reference in New Issue
Block a user