mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-06-24 05:35:10 +00:00
@@ -12,7 +12,7 @@ class ParksNPeaks(HTTPAlertProvider):
|
|||||||
"""Alert provider for Parks n Peaks"""
|
"""Alert provider for Parks n Peaks"""
|
||||||
|
|
||||||
POLL_INTERVAL_SEC = 1800
|
POLL_INTERVAL_SEC = 1800
|
||||||
ALERTS_URL = "http://parksnpeaks.org/api/ALERTS/"
|
ALERTS_URL = "https://parksnpeaks.org/api/ALERTS/"
|
||||||
|
|
||||||
def __init__(self, provider_config):
|
def __init__(self, provider_config):
|
||||||
super().__init__(provider_config, self.ALERTS_URL, self.POLL_INTERVAL_SEC)
|
super().__init__(provider_config, self.ALERTS_URL, self.POLL_INTERVAL_SEC)
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ from core.cache_utils import SEMI_STATIC_URL_DATA_CACHE
|
|||||||
from core.config import config
|
from core.config import config
|
||||||
from core.constants import BANDS, UNKNOWN_BAND, CW_MODES, PHONE_MODES, DATA_MODES, ALL_MODES, \
|
from core.constants import BANDS, UNKNOWN_BAND, CW_MODES, PHONE_MODES, DATA_MODES, ALL_MODES, \
|
||||||
HTTP_HEADERS, HAMQTH_PRG, MODE_ALIASES
|
HTTP_HEADERS, HAMQTH_PRG, MODE_ALIASES
|
||||||
from data.lookup_credentials import LookupCredentials
|
|
||||||
|
|
||||||
# QRZ XML field names differ from pyhamtools' normalised names; map them here.
|
# QRZ XML field names differ from pyhamtools' normalised names; map them here.
|
||||||
_QRZ_FIELD_MAP = {
|
_QRZ_FIELD_MAP = {
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ class APIAlertsStreamHandler(tornado_eventsource.handler.EventSourceHandler):
|
|||||||
if self._alert_queue not in self._sse_alert_queues:
|
if self._alert_queue not in self._sse_alert_queues:
|
||||||
logging.error("Web server cleared up a queue of an active connection!")
|
logging.error("Web server cleared up a queue of an active connection!")
|
||||||
self.close()
|
self.close()
|
||||||
except:
|
except Exception as e:
|
||||||
logging.warning("Exception in SSE callback, connection will be closed: %s", e, exc_info=True)
|
logging.warning("Exception in SSE callback, connection will be closed: %s", e, exc_info=True)
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
import json
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
import pytz
|
import pytz
|
||||||
import tornado
|
import tornado
|
||||||
|
|
||||||
from core.prometheus_metrics_handler import api_requests_counter
|
from core.prometheus_metrics_handler import api_requests_counter
|
||||||
from core.utils import serialize_everything
|
|
||||||
|
|
||||||
|
|
||||||
class APISolarConditionsHandler(tornado.web.RequestHandler):
|
class APISolarConditionsHandler(tornado.web.RequestHandler):
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ class APISpotsStreamHandler(tornado_eventsource.handler.EventSourceHandler):
|
|||||||
if self._spot_queue not in self._sse_spot_queues:
|
if self._spot_queue not in self._sse_spot_queues:
|
||||||
logging.error("Web server cleared up a queue of an active connection!")
|
logging.error("Web server cleared up a queue of an active connection!")
|
||||||
self.close()
|
self.close()
|
||||||
except:
|
except Exception as e:
|
||||||
logging.warning("Exception in SSE callback, connection will be closed: %s", e, exc_info=True)
|
logging.warning("Exception in SSE callback, connection will be closed: %s", e, exc_info=True)
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
<p>This software is dedicated to the memory of Tom G1PJB, SK, a friend and colleague who sadly passed away around the time I started writing it in Autumn 2025. I was looking forward to showing it to you when it was done.</p>
|
<p>This software is dedicated to the memory of Tom G1PJB, SK, a friend and colleague who sadly passed away around the time I started writing it in Autumn 2025. I was looking forward to showing it to you when it was done.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/js/common.js?v=1781811363"></script>
|
<script src="/js/common.js?v=1781811380"></script>
|
||||||
<script>$(document).ready(function() { $("#nav-link-about").addClass("active"); }); <!-- highlight active page in nav --></script>
|
<script>$(document).ready(function() { $("#nav-link-about").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||||
|
|
||||||
{% end %}
|
{% end %}
|
||||||
@@ -69,8 +69,8 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/js/common.js?v=1781811363"></script>
|
<script src="/js/common.js?v=1781811380"></script>
|
||||||
<script src="/js/add-spot.js?v=1781811363"></script>
|
<script src="/js/add-spot.js?v=1781811380"></script>
|
||||||
<script>$(document).ready(function() { $("#nav-link-add-spot").addClass("active"); }); <!-- highlight active page in nav --></script>
|
<script>$(document).ready(function() { $("#nav-link-add-spot").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||||
|
|
||||||
{% end %}
|
{% end %}
|
||||||
@@ -70,8 +70,8 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/js/common.js?v=1781811363"></script>
|
<script src="/js/common.js?v=1781811380"></script>
|
||||||
<script src="/js/alerts.js?v=1781811363"></script>
|
<script src="/js/alerts.js?v=1781811380"></script>
|
||||||
<script>$(document).ready(function() { $("#nav-link-alerts").addClass("active"); }); <!-- highlight active page in nav --></script>
|
<script>$(document).ready(function() { $("#nav-link-alerts").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||||
|
|
||||||
{% end %}
|
{% end %}
|
||||||
@@ -76,9 +76,9 @@
|
|||||||
<script>
|
<script>
|
||||||
let spotProvidersEnabledByDefault = {% raw json_encode(web_ui_options["spot-providers-enabled-by-default"]) %};
|
let spotProvidersEnabledByDefault = {% raw json_encode(web_ui_options["spot-providers-enabled-by-default"]) %};
|
||||||
</script>
|
</script>
|
||||||
<script src="/js/common.js?v=1781811363"></script>
|
<script src="/js/common.js?v=1781811380"></script>
|
||||||
<script src="/js/spotsbandsandmap.js?v=1781811363"></script>
|
<script src="/js/spotsbandsandmap.js?v=1781811380"></script>
|
||||||
<script src="/js/bands.js?v=1781811363"></script>
|
<script src="/js/bands.js?v=1781811380"></script>
|
||||||
<script>$(document).ready(function() { $("#nav-link-bands").addClass("active"); }); <!-- highlight active page in nav --></script>
|
<script>$(document).ready(function() { $("#nav-link-bands").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||||
|
|
||||||
{% end %}
|
{% end %}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{% extends "skeleton.html" %}
|
{% extends "skeleton.html" %}
|
||||||
{% block head_extra %}
|
{% block head_extra %}
|
||||||
<link rel="stylesheet" href="/css/style.css?v=1781811363" type="text/css">
|
<link rel="stylesheet" href="/css/style.css?v=1781811380" type="text/css">
|
||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
|
||||||
<link href="/fa/css/fontawesome.min.css" rel="stylesheet" />
|
<link href="/fa/css/fontawesome.min.css" rel="stylesheet" />
|
||||||
<link href="/fa/css/solid.min.css" rel="stylesheet" />
|
<link href="/fa/css/solid.min.css" rel="stylesheet" />
|
||||||
@@ -10,9 +10,9 @@
|
|||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/tinycolor2@1.6.0/cjs/tinycolor.min.js" crossorigin="anonymous"></script>
|
<script src="https://cdn.jsdelivr.net/npm/tinycolor2@1.6.0/cjs/tinycolor.min.js" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
<script src="https://misc.ianrenton.com/jsutils/utils.js?v=1781811363"></script>
|
<script src="https://misc.ianrenton.com/jsutils/utils.js?v=1781811380"></script>
|
||||||
<script src="https://misc.ianrenton.com/jsutils/ui-ham.js?v=1781811363"></script>
|
<script src="https://misc.ianrenton.com/jsutils/ui-ham.js?v=1781811380"></script>
|
||||||
<script src="https://misc.ianrenton.com/jsutils/geo.js?v=1781811363"></script>
|
<script src="https://misc.ianrenton.com/jsutils/geo.js?v=1781811380"></script>
|
||||||
{% end %}
|
{% end %}
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|||||||
@@ -284,8 +284,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.9/dist/chart.umd.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.9/dist/chart.umd.min.js"></script>
|
||||||
<script src="/js/common.js?v=1781811363"></script>
|
<script src="/js/common.js?v=1781811380"></script>
|
||||||
<script src="/js/conditions.js?v=1781811363"></script>
|
<script src="/js/conditions.js?v=1781811380"></script>
|
||||||
<script>$(document).ready(function () {
|
<script>$(document).ready(function () {
|
||||||
$("#nav-link-conditions").addClass("active");
|
$("#nav-link-conditions").addClass("active");
|
||||||
}); <!-- highlight active page in nav --></script>
|
}); <!-- highlight active page in nav --></script>
|
||||||
|
|||||||
@@ -94,9 +94,9 @@
|
|||||||
<script>
|
<script>
|
||||||
let spotProvidersEnabledByDefault = {% raw json_encode(web_ui_options["spot-providers-enabled-by-default"]) %};
|
let spotProvidersEnabledByDefault = {% raw json_encode(web_ui_options["spot-providers-enabled-by-default"]) %};
|
||||||
</script>
|
</script>
|
||||||
<script src="/js/common.js?v=1781811363"></script>
|
<script src="/js/common.js?v=1781811380"></script>
|
||||||
<script src="/js/spotsbandsandmap.js?v=1781811363"></script>
|
<script src="/js/spotsbandsandmap.js?v=1781811380"></script>
|
||||||
<script src="/js/map.js?v=1781811363"></script>
|
<script src="/js/map.js?v=1781811380"></script>
|
||||||
<script>$(document).ready(function() { $("#nav-link-map").addClass("active"); }); <!-- highlight active page in nav --></script>
|
<script>$(document).ready(function() { $("#nav-link-map").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||||
|
|
||||||
{% end %}
|
{% end %}
|
||||||
@@ -104,9 +104,9 @@
|
|||||||
<script>
|
<script>
|
||||||
let spotProvidersEnabledByDefault = {% raw json_encode(web_ui_options["spot-providers-enabled-by-default"]) %};
|
let spotProvidersEnabledByDefault = {% raw json_encode(web_ui_options["spot-providers-enabled-by-default"]) %};
|
||||||
</script>
|
</script>
|
||||||
<script src="/js/common.js?v=1781811363"></script>
|
<script src="/js/common.js?v=1781811380"></script>
|
||||||
<script src="/js/spotsbandsandmap.js?v=1781811363"></script>
|
<script src="/js/spotsbandsandmap.js?v=1781811380"></script>
|
||||||
<script src="/js/spots.js?v=1781811363"></script>
|
<script src="/js/spots.js?v=1781811380"></script>
|
||||||
<script>$(document).ready(function() { $("#nav-link-spots").addClass("active"); }); <!-- highlight active page in nav --></script>
|
<script>$(document).ready(function() { $("#nav-link-spots").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||||
|
|
||||||
{% end %}
|
{% end %}
|
||||||
@@ -59,8 +59,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/js/common.js?v=1781811363"></script>
|
<script src="/js/common.js?v=1781811380"></script>
|
||||||
<script src="/js/status.js?v=1781811363"></script>
|
<script src="/js/status.js?v=1781811380"></script>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() { $("#nav-link-status").addClass("active"); }); <!-- highlight active page in nav -->
|
$(document).ready(function() { $("#nav-link-status").addClass("active"); }); <!-- highlight active page in nav -->
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ tr.new td {
|
|||||||
background-color: var(--bs-success-border-subtle);
|
background-color: var(--bs-success-border-subtle);
|
||||||
}
|
}
|
||||||
100% {
|
100% {
|
||||||
background-color: intial;
|
background-color: initial;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -355,7 +355,7 @@ div.band-spot:hover span.band-spot-info {
|
|||||||
|
|
||||||
/* GENERAL MOBILE SUPPORT */
|
/* GENERAL MOBILE SUPPORT */
|
||||||
|
|
||||||
@media (max-width: 991.99px) {
|
@media (max-width: 991px) {
|
||||||
/* General "hide this on mobile" class */
|
/* General "hide this on mobile" class */
|
||||||
.hideonmobile {
|
.hideonmobile {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
|
|||||||
Reference in New Issue
Block a user