Refactor code into fewer files, removing dynamic folders
This commit is contained in:
35
core/templates/manage/threshold/irc/overview/networks.html
Normal file
35
core/templates/manage/threshold/irc/overview/networks.html
Normal file
@@ -0,0 +1,35 @@
|
||||
<div id="networks">
|
||||
<div class="content" style="max-height: 30em; overflow: auto;">
|
||||
<table class="table is-fullwidth is-hoverable">
|
||||
<thead>
|
||||
<th>net</th>
|
||||
<th>relays</th>
|
||||
<th>channels</th>
|
||||
<th>records</th>
|
||||
</thead>
|
||||
{% for key, net in networks.items %}
|
||||
<tr>
|
||||
<th><a href="{% url 'threshold_irc_network' key %}">{{ key }}</a></th>
|
||||
<td>
|
||||
<span class="icon">
|
||||
<i class="fa-brands fa-unity"></i>
|
||||
</span>
|
||||
{{ net.relays }}
|
||||
</td>
|
||||
<td>
|
||||
<span class="icon">
|
||||
<i class="fa-solid fa-hashtag"></i>
|
||||
</span>
|
||||
{{ net.channels }}
|
||||
</td>
|
||||
<td>
|
||||
<span class="icon">
|
||||
<i class="fa-solid fa-album"></i>
|
||||
</span>
|
||||
{{ net.records }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
51
core/templates/manage/threshold/irc/overview/overview.html
Normal file
51
core/templates/manage/threshold/irc/overview/overview.html
Normal file
@@ -0,0 +1,51 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
|
||||
<div
|
||||
style="display: none;"
|
||||
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
|
||||
hx-post="{% url 'threshold_irc_stats' %}"
|
||||
hx-trigger="load"
|
||||
hx-target="#stats"
|
||||
hx-swap="outerHTML">
|
||||
</div>
|
||||
|
||||
<div
|
||||
style="display: none;"
|
||||
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
|
||||
hx-post="{% url 'threshold_irc_networks' %}"
|
||||
hx-trigger="load"
|
||||
hx-target="#networks"
|
||||
hx-swap="outerHTML">
|
||||
</div>
|
||||
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<div class="box">
|
||||
<div id="stats">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="box">
|
||||
<div id="networks">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<div class="box">
|
||||
<div id="channels">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="box">
|
||||
<div id="alerts">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
49
core/templates/manage/threshold/irc/overview/stats.html
Normal file
49
core/templates/manage/threshold/irc/overview/stats.html
Normal file
@@ -0,0 +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>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>
|
||||
<tr>
|
||||
<th>records</th>
|
||||
<td>
|
||||
{{ stats.records }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>events</th>
|
||||
<td>
|
||||
{{ stats.eventrate }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user