Add links to nodes in a traceroute.

I should add the names as well but I am lazy.
This commit is contained in:
Jason Michalski
2024-05-26 22:51:36 -07:00
parent 29a602ca11
commit 45adc7baf8
2 changed files with 14 additions and 0 deletions
+12
View File
@@ -41,6 +41,18 @@
{% if packet.pretty_payload %}
<div>{{packet.pretty_payload}}<div>
{% endif %}
{% if packet.raw_mesh_packet.decoded.portnum == 70 %}
<ul>
{% for node_id in packet.raw_payload.route %}
<li><a
href="/packet_list/{{node_id}}"
>
{{node_id | node_id_to_hex}}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
<pre>{{packet.payload}}</pre>
</dd>
</dl>
+2
View File
@@ -103,6 +103,7 @@ class Packet:
to_node: models.Node
portnum: int
data: str
raw_mesh_packet: object
raw_payload: object
payload: str
pretty_payload: Markup
@@ -153,6 +154,7 @@ class Packet:
payload=text_payload,
pretty_payload=pretty_payload,
import_time=packet.import_time,
raw_mesh_packet=mesh_packet,
raw_payload=payload,
)