Skip to content

Commit

Permalink
more dynamic elements in the templates
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinelliott committed Jul 12, 2024
1 parent 28b27e5 commit cbb28de
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion templates/static/chat.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<h1 class="mb-2 text-xl">Chat</h1>
<p class="mb-2">
There are <b>{{ chat['channels']['0']['messages']|count }}</b> messages on channel 0 that have
been heard by the mesh by <b>KE-R</b> (!4355f528).
been heard by the mesh by <a href="node_{{ config['server']['node_id'] }}.html">{{ config['server']['node_id'] }}</a> ({{ config['server']['node_id'] }}).
</p>

<h2 class="text-lg font-bold">Channel 0</h2>
Expand Down
3 changes: 2 additions & 1 deletion templates/static/index.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
{% block content %}
<h1>Welcome!</h1>
<p>
This is a site that shows data about the SVM by <b>KE-R</b> (!4355f528).
This is a site that shows data about the <b>{{ config['server']['name' }}</b> by
<a href="node_{{ config['server']['node_id'] }}.html">{{ config['server']['node_id'] }}</a> ({{ config['server']['node_id'] }}).
</p>
<p>Last updated: {{ timestamp.astimezone(zoneinfo).strftime('%Y-%m-%d %H:%M:%S %z') }}</p>
{% endblock %}
3 changes: 2 additions & 1 deletion templates/static/mesh_log.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
{% block content %}
<h1>Mesh Messages</h1>
<p>
All messages from the mesh as seen by <b>KE-R</b> (!4355f528). Only the messages received
All messages from the mesh as seen by
<a href="node_{{ config['server']['node_id'] }}.html">{{ config['server']['node_id'] }}</a> ({{ config['server']['node_id'] }}). Only the messages received
since this server was last restarted are shown.
</p>
<p>Last updated: {{ timestamp.astimezone(zoneinfo).strftime('%Y-%m-%d %H:%M:%S %z') }}</p>
Expand Down
2 changes: 1 addition & 1 deletion templates/static/mqtt_log.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% block content %}
<h1>MQTT Messages</h1>
<p>
All messages received by MQTT from the mesh as seen by <b>KE-R</b> (!4355f528).
All messages received by MQTT from the mesh as seen by <a href="node_{{ config['server']['node_id'] }}.html">{{ config['server']['node_id'] }}</a> ({{ config['server']['node_id'] }}).
If multiple nodes are feeding this MQTT server, the messages will be from all of them.
Only the messages received since this server was last restarted are shown.
</p>
Expand Down
2 changes: 1 addition & 1 deletion templates/static/neighbors.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<h1 class="mb-2 text-xl">Neighbors</h1>
<p class="mb-2">
There are <b>{{ active_nodes_with_neighbors|count }}</b> active nodes with neighbors
that have been heard by the mesh by <b>KE-R</b> (!4355f528).
that have been heard by the mesh by <a href="node_{{ config['server']['node_id'] }}.html">{{ config['server']['node_id'] }}</a> ({{ config['server']['node_id'] }}).
</p>

<table class="w-full max-w-full table-auto border-collapse border border-gray-500 bg-gray-50">
Expand Down
3 changes: 2 additions & 1 deletion templates/static/nodes.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
<h1 class="mb-2 text-xl">Nodes</h1>
<p class="mb-2">
There are <b>{{ active_nodes|count }}</b> active out of a total of <b>{{ nodes|count }}</b> seen nodes
that have been heard by the mesh by <b>{{ config['server']['node_id'] }}</b> ({{ config['server']['node_id'] }}).
that have been heard by the mesh by
<a href="node_{{ config['server']['node_id'] }}.html">{{ config['server']['node_id'] }}</a> ({{ config['server']['node_id'] }}).
</p>
<table class="w-full max-w-full table-auto border-collapse border border-gray-500 bg-gray-50">
<thead>
Expand Down
2 changes: 1 addition & 1 deletion templates/static/routes.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% block content %}
<h1>Routes</h1>
<p>
Route paths of the mesh as seen by <b>KE-R</b> (!4355f528).
Route paths of the mesh as seen by <a href="node_{{ config['server']['node_id'] }}.html">{{ config['server']['node_id'] }}</a> ({{ config['server']['node_id'] }}).
</p>
<p>Last updated: {{ timestamp.astimezone(zoneinfo).strftime('%Y-%m-%d %H:%M:%S %z') }}</p>
{% endblock %}
2 changes: 1 addition & 1 deletion templates/static/stats.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<h1 class="mb-2 text-xl">Stats</h1>
<p class="mb-2">
Some revelations based on messages that have
been heard by the mesh by <b>KE-R</b> (!4355f528).
been heard by the mesh by <a href="node_{{ config['server']['node_id'] }}.html">{{ config['server']['node_id'] }}</a> ({{ config['server']['node_id'] }}).
</p>

<h3 class="text-lg">Current</h3>
Expand Down
2 changes: 1 addition & 1 deletion templates/static/telemetry.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<h5 class="mb-2 text-gray-500">Telemetry</h5>
<h1 class="mb-2 text-xl">Telemetry</h1>
<p class="mb-2">
Telemetry as seen by <b>{{ nodes[config['server']['node_id']].shortname }}</b> ({{ config['server']['node_id'] }}).
Telemetry as seen by <a href="node_{{ config['server']['node_id'] }}.html">{{ config['server']['node_id'] }}</a> ({{ config['server']['node_id'] }}).
</p>

<table class="w-full max-w-full table-auto border-collapse border border-gray-500 bg-gray-50">
Expand Down
2 changes: 1 addition & 1 deletion templates/static/traceroutes.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<h5 class="mb-2 text-gray-500">Traceroutes</h5>
<h1 class="mb-2 text-xl">Traceroutes</h1>
<p class="mb-2">
Traceroutes as seen by <b>{{ nodes[config['server']['node_id']].shortname }}</b> ({{ config['server']['node_id'] }}).
Traceroutes as seen by <a href="node_{{ config['server']['node_id'] }}.html">{{ config['server']['node_id'] }}</a> ({{ config['server']['node_id'] }}).
</p>

<table class="w-full max-w-full table-auto border-collapse border border-gray-500 bg-gray-50">
Expand Down

0 comments on commit cbb28de

Please sign in to comment.