diff --git a/server/webserver.py b/server/webserver.py index 11f5a74..91cc741 100644 --- a/server/webserver.py +++ b/server/webserver.py @@ -39,6 +39,7 @@ class WebServer: # Routes for templated pages bottle.get("/")(lambda: self.serve_template('webpage_spots')) bottle.get("/map")(lambda: self.serve_template('webpage_map')) + bottle.get("/bands")(lambda: self.serve_template('webpage_bands')) bottle.get("/alerts")(lambda: self.serve_template('webpage_alerts')) bottle.get("/status")(lambda: self.serve_template('webpage_status')) bottle.get("/about")(lambda: self.serve_template('webpage_about')) @@ -224,6 +225,16 @@ class WebServer: case "comment_includes": comment_includes = query.get(k).strip() spots = [s for s in spots if s.comment and comment_includes.upper() in s.comment.upper()] + case "allow_qrt": + # If false, spots that are flagged as QRT are not returned. + prevent_qrt = query.get(k).upper() == "FALSE" + if prevent_qrt: + spots = [s for s in spots if not s.qrt or s.qrt == False] + case "needs_location": + # If true, spots require a location to be returned + needs_location = query.get(k).upper() == "TRUE" + if needs_location: + spots = [s for s in spots if s.latitude and s.longitude] case "dedupe": # Ensure only the latest spot of each callsign is present in the list. This relies on the list being # in reverse time order, so if any future change allows re-ordering the list, that should be done diff --git a/views/webpage_bands.tpl b/views/webpage_bands.tpl new file mode 100644 index 0000000..d4ff7cc --- /dev/null +++ b/views/webpage_bands.tpl @@ -0,0 +1,124 @@ +% rebase('webpage_base.tpl') + +
Loading...
++ + +
+Last + + minutes +
+