change node_detail.html

This commit is contained in:
Laura Klünder 2024-03-30 22:47:27 +01:00
parent 272581c19e
commit 2174f1f4de
2 changed files with 22 additions and 23 deletions

View file

@ -6,13 +6,11 @@
{% block subcontent %} {% block subcontent %}
<div class="columns"> <div class="columns">
<div> <div>
<h4>General</h4> <h4>Connection</h4>
<p> <p>
<strong>Address:</strong> {{ node.address }}<br> <strong>Address:</strong> {{ node.address }}<br>
<strong>Name:</strong> {% if node.name %}{{ node.name }}{% else %}<em>{% trans '(no name)' %}</em>{% endif %}
</p> </p>
<p> <p>
{% comment %}todo: more details{% endcomment %}
<strong>Uplink:</strong> <strong>Uplink:</strong>
{% with uplink=node.get_uplink %} {% with uplink=node.get_uplink %}
{% if uplink %} {% if uplink %}
@ -53,6 +51,7 @@
</a> </a>
</p> </p>
<h4>Hardware</h4> <h4>Hardware</h4>
<p> <p>
<strong>Board:</strong> {{ node.last_messages.CONFIG_BOARD.parsed.content.board_config.board.pretty_name }} <strong>Board:</strong> {{ node.last_messages.CONFIG_BOARD.parsed.content.board_config.board.pretty_name }}
@ -67,13 +66,13 @@
<br> <br>
<strong>UWB:</strong> {{ node.last_messages.CONFIG_BOARD.parsed.content.led }} <strong>UWB:</strong> {{ node.last_messages.CONFIG_BOARD.parsed.content.led }}
{% endif %} {% endif %}
</p> </p>
<p> <p>
<a class="button" href="{% url "mesh.send" recipient=node.address msg_type="CONFIG_BOARD" %}"> <a class="button" href="{% url "mesh.send" recipient=node.address msg_type="CONFIG_BOARD" %}">
{% trans 'Chaange board settings' %} {% trans 'Chaange board settings' %}
</a> </a>
</p> </p>
<h4>Firmware</h4> <h4>Firmware</h4>
<p> <p>
{% if node.firmware_description.build %} {% if node.firmware_description.build %}
@ -86,18 +85,6 @@
<strong>SHA256:</strong> <small>{{ node.firmware_description.sha256_hash }}</small><br> <strong>SHA256:</strong> <small>{{ node.firmware_description.sha256_hash }}</small><br>
{% endif %} {% endif %}
</p> </p>
</div>
<div>
<h4>Node configuration</h4>
<p>
<strong>Number:</strong> {{ node.last_messages.CONFIG_NODE.parsed.content.number }}<br>
<strong>Name:</strong> {{ node.last_messages.CONFIG_NODE.parsed.content.name }}
</p>
<p>
<a class="button" href="{% url "mesh.send" recipient=node.address msg_type="CONFIG_NODE" %}">
{% trans 'Change' %}
</a>
</p>
<h4>Uplink configuration</h4> <h4>Uplink configuration</h4>
<p> <p>
@ -114,15 +101,15 @@
{% trans 'Change' %} {% trans 'Change' %}
</a> </a>
</p> </p>
</div>
<h4>iBeacon configuration</h4> <div>
<h4>Node configuration</h4>
<p> <p>
<strong>UUID:</strong> {{ node.last_messages.CONFIG_IBEACON.parsed.content.uuid }}<br> <strong>Number:</strong> {{ node.last_messages.CONFIG_NODE.parsed.content.number }},
<strong>Major:</strong> {{ node.last_messages.CONFIG_IBEACON.parsed.content.major }}<br> <strong>Name:</strong> {{ node.last_messages.CONFIG_NODE.parsed.content.name }}
<strong>Minor:</strong> {{ node.last_messages.CONFIG_IBEACON.parsed.content.minor }}
</p> </p>
<p> <p>
<a class="button" href="{% url "mesh.send" recipient=node.address msg_type="CONFIG_IBEACON" %}"> <a class="button" href="{% url "mesh.send" recipient=node.address msg_type="CONFIG_NODE" %}">
{% trans 'Change' %} {% trans 'Change' %}
</a> </a>
</p> </p>
@ -159,6 +146,18 @@
</p> </p>
{% endif %} {% endif %}
{% endwith %} {% endwith %}
<h4>iBeacon configuration</h4>
<p>
<strong>UUID:</strong> {{ node.last_messages.CONFIG_IBEACON.parsed.content.uuid }}<br>
<strong>Major:</strong> {{ node.last_messages.CONFIG_IBEACON.parsed.content.major }},
<strong>Minor:</strong> {{ node.last_messages.CONFIG_IBEACON.parsed.content.minor }}
</p>
<p>
<a class="button" href="{% url "mesh.send" recipient=node.address msg_type="CONFIG_IBEACON" %}">
{% trans 'Change' %}
</a>
</p>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}

View file

@ -12,7 +12,7 @@
<th>{% trans 'Firmware' %}</th> <th>{% trans 'Firmware' %}</th>
<th>{% trans 'Last msg' %}</th> <th>{% trans 'Last msg' %}</th>
<th>{% trans 'Last signin' %}</th> <th>{% trans 'Last signin' %}</th>
<th>{% trans 'Uplink' %}</th> <th>{% trans 'Connection' %}</th>
</tr> </tr>
{% for node in nodes %} {% for node in nodes %}
<tr> <tr>