Implement SSE endpoints in Tornado #3

This commit is contained in:
Ian Renton
2025-12-23 21:01:41 +00:00
parent d463403018
commit 86beb27ebf
7 changed files with 129 additions and 73 deletions

View File

@@ -45,6 +45,9 @@ function restartSSEConnection() {
spots = spots.slice(0, -1);
// Add spot to table
addSpotToTopOfTable(newSpot, true);
// Drop oldest spot off the end of the table. This is two rows because of the mobile view extra rows
$("#table tbody tr").last().remove();
$("#table tbody tr").last().remove();
};
evtSource.onerror = function(err) {
@@ -216,9 +219,8 @@ function createNewTableRowsForSpot(s, highlightNew) {
// Format the mode
mode_string = s["mode"];
if (s["mode"] == null) {
mode_string = "???";
}
if (s["mode_source"] == "BANDPLAN") {
mode_string = "";
} else if (s["mode_source"] == "BANDPLAN") {
mode_string = mode_string + "<span class='mode-q hideonmobile'><i class='fa-solid fa-circle-question' title='The mode was not reported via the spotting service. This is a guess based on the frequency.'></i></span>";
}