Implement network statistics

This commit is contained in:
2022-07-25 19:08:28 +01:00
parent 1c4d87e662
commit c993bb9c6e
5 changed files with 108 additions and 114 deletions

View File

@@ -2,33 +2,33 @@
<div class="content" style="max-height: 30em; overflow: auto;">
<table class="table is-fullwidth is-hoverable">
<thead>
<th>name</th>
<th>net</th>
<th>relays</th>
<th>channels</th>
<th>records</th>
</thead>
{% for key, net in networks.items %}
<tr>
<th>{{ key }}</th>
<td>
<span class="icon has-text-info has-tooltip-info">
<i class="fa-brands fa-unity"></i>
</span>
{{ net.relays }}
</td>
<td>
<span class="icon has-text-info has-tooltip-info">
<i class="fa-solid fa-hashtag"></i>
</span>
{{ net.channels }}
</td>
<td>
<span class="icon has-text-info has-tooltip-info">
<i class="fa-solid fa-album"></i>
</span>
{{ net.records }}
</td>
</tr>
<tr>
<th>{{ key }}</th>
<td>
<span class="icon has-text-info has-tooltip-info">
<i class="fa-brands fa-unity"></i>
</span>
{{ net.relays }}
</td>
<td>
<span class="icon has-text-info has-tooltip-info">
<i class="fa-solid fa-hashtag"></i>
</span>
{{ net.channels }}
</td>
<td>
<span class="icon has-text-info has-tooltip-info">
<i class="fa-solid fa-album"></i>
</span>
{{ net.records }}
</td>
</tr>
{% endfor %}
</table>
</div>

View File

@@ -1,57 +1,49 @@
<div id="stats">
<div class="content" style="max-height: 30em; overflow: auto;">
<div class="table-container">
<table class="table is-fullwidth is-hoverable">
<thead>
<tr>
<th>X</th>
<th>total</th>
<th>unique</th>
</tr>
</thead>
<tbody>
<tr>
<th>total</th>
<td>
{{ stats.servers_total_total }}
</td>
<td>
{{ stats.servers_total_unique }}
</td>
</tr>
<tr>
<th>online</th>
<td>
{{ stats.servers_online_total }}
</td>
<td>
{{ stats.servers_online_unique }}
</td>
</tr>
<table class="table is-fullwidth is-hoverable">
<thead>
<tr>
<th>attribute</th>
<th>count</th>
</tr>
</thead>
<tbody>
<tr>
<th>relays</th>
<td>
{{ stats.servers_online_total }}/{{ stats.servers_total_total }}
</td>
</tr>
<tr>
<th>networks</th>
<td>
{{ stats.servers_online_unique }}/{{ stats.servers_total_unique }}
</td>
</tr>
<tr>
<th>channels</th>
<td>
{{ stats.channels}}
</td>
<tr>
<th>channels</th>
<td>
{{ stats.channels}}
</td>
</tr>
<tr>
<th>records</th>
<td>
{{ stats.records }}
</td>
</tr>
<tr>
<th>events</th>
<td>
{{ stats.eventrate }}
</td>
</tr>
</tr>
<tr>
<th>records</th>
<td>
{{ stats.records }}
</td>
</tr>
<tr>
<th>events</th>
<td>
{{ stats.eventrate }}
</td>
</tr>
</tbody>
</table>
</tbody>
</table>
</div>
</div>
</div>