diff --git a/meshview/templates/firehose.html b/meshview/templates/firehose.html index f2b2ec5..fcfe27f 100644 --- a/meshview/templates/firehose.html +++ b/meshview/templates/firehose.html @@ -1,16 +1,39 @@ {% extends "base.html" %} {% block body %} -
-
-
- {% for packet in packets %} - {% include 'packet.html' %} - {% else %} - No packets found. - {% endfor %} -
-
+
+
+ {% set options = { + 1: "Text Message", + 3: "Position", + 4: "Node Info", + 67: "Telemetry", + 71: "Neighbor Info", + } + %} + + +
+
+
+ {% for packet in packets %} + {% include 'packet.html' %} + {% else %} + No packets found. + {% endfor %}
+
+
{% endblock %} diff --git a/meshview/web.py b/meshview/web.py index e9ac19e..4a033bd 100644 --- a/meshview/web.py +++ b/meshview/web.py @@ -331,11 +331,15 @@ async def packet_details(request): @routes.get("/firehose") async def packet_details(request): - packets = await store.get_packets() + portnum = request.query.get("portnum") + if portnum: + portnum = int(portnum) + packets = await store.get_packets(portnum=portnum) template = env.get_template("firehose.html") return web.Response( text=template.render( packets=(Packet.from_model(p) for p in packets), + portnum=portnum, ), content_type="text/html", )