fix route request UI
This commit is contained in:
parent
b1ae6ea391
commit
1e1df10bfa
2 changed files with 5 additions and 3 deletions
|
@ -9,8 +9,9 @@
|
||||||
|
|
||||||
{% block subcontent %}
|
{% block subcontent %}
|
||||||
<p><a class="button" href="{{ success_url }}">Go back</a></p>
|
<p><a class="button" href="{{ success_url }}">Go back</a></p>
|
||||||
{% if msg_type == "MESH_ROUTE_REQUEST" %}
|
{{ msg_type_raw }}
|
||||||
<p>Route to <a href="{% url "mesh.node.detail" pk=msg_data.address %}">{{ msg_data.address }} {% if node_name %} ({{ node_name }}){% endif %}</a></p>
|
{% if msg_type_raw == "MESH_ROUTE_REQUEST" %}
|
||||||
|
<p>Route to <a href="{% url "mesh.node.detail" pk=msg_data.content.address %}">{{ msg_data.content.address }} {% if node_name %} ({{ node_name }}){% endif %}</a></p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div>
|
<div>
|
||||||
|
@ -32,7 +33,7 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% if msg_type == "MESH_ROUTE_REQUEST" %}
|
{% if msg_type_raw == "MESH_ROUTE_REQUEST" %}
|
||||||
<div style="min-width: 12vw;">
|
<div style="min-width: 12vw;">
|
||||||
<h4>Routes</h4>
|
<h4>Routes</h4>
|
||||||
<table>
|
<table>
|
||||||
|
|
|
@ -130,4 +130,5 @@ class MeshMessageSendingView(MeshControlMixin, TemplateView):
|
||||||
"node_name": node_names.get(data["msg_data"]["content"].get("address"), ""),
|
"node_name": node_names.get(data["msg_data"]["content"].get("address"), ""),
|
||||||
"recipients": [(address, node_names[address]) for address in data["recipients"]],
|
"recipients": [(address, node_names[address]) for address in data["recipients"]],
|
||||||
"msg_type": MeshMessageType[data["msg_data"]["content"]["msg_type"]].pretty_name,
|
"msg_type": MeshMessageType[data["msg_data"]["content"]["msg_type"]].pretty_name,
|
||||||
|
"msg_type_raw": MeshMessageType[data["msg_data"]["content"]["msg_type"]],
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue