diff --git a/templates/alerts.html b/templates/alerts.html index 42dd919..d35cc00 100644 --- a/templates/alerts.html +++ b/templates/alerts.html @@ -8,8 +8,8 @@

- - + +

diff --git a/templates/bands.html b/templates/bands.html index 73d3d2c..2f814e5 100644 --- a/templates/bands.html +++ b/templates/bands.html @@ -8,8 +8,8 @@

- - + +

diff --git a/templates/map.html b/templates/map.html index 3db361c..40498e1 100644 --- a/templates/map.html +++ b/templates/map.html @@ -7,8 +7,8 @@

- - + +

diff --git a/templates/spots.html b/templates/spots.html index c7b94eb..67704d9 100644 --- a/templates/spots.html +++ b/templates/spots.html @@ -10,24 +10,25 @@
-
-

Loading...

-
-
+

- + - + +

+
+
+

- - + +

diff --git a/webassets/js/spots.js b/webassets/js/spots.js index f078531..0e852af 100644 --- a/webassets/js/spots.js +++ b/webassets/js/spots.js @@ -13,9 +13,6 @@ function loadSpots() { // Make the new query $.getJSON('/api/v1/spots' + buildQueryString(), function(jsonData) { - // Store last updated time - lastUpdateTime = moment.utc(); - updateTimingDisplayRunPause(); // Store data spots = jsonData; // Update table @@ -37,9 +34,6 @@ function startSSEConnection() { evtSource = new EventSource('/api/v1/spots/stream' + buildQueryString()); evtSource.onmessage = function(event) { - // Store last updated time - lastUpdateTime = moment.utc(); - updateTimingDisplayRunPause(); // Get the new spot newSpot = JSON.parse(event.data); // Awful fudge to ensure new incoming spots at the top of the list don't have timestamps that make them look @@ -78,12 +72,6 @@ function startSSEConnection() { }; } -// Update the special timing display for the live spots page, which varies depending on run/pause selection. -function updateTimingDisplayRunPause() { - let run = $('#runButton:checked').val(); - $("#timing-container").html((run ? "Connected to server. Last update at " : "Paused at ") + lastUpdateTime.format('HH:mm') + " UTC."); -} - // Build a query string for the API, based on the filters that the user has selected. function buildQueryString() { var str = "?"; @@ -515,13 +503,11 @@ $(document).ready(function() { // Need to start the SSE connection but also do a full re-query to catch up anything that we missed, so we // might as well just call loadSpots again which will trigger it all loadSpots(); - updateTimingDisplayRunPause(); }); $("#pauseButton").change(function() { // If we are pausing and have an open SSE connection, stop it if (evtSource != null) { evtSource.close(); } - updateTimingDisplayRunPause(); }); }); \ No newline at end of file