Implement showing LIST information

This commit is contained in:
2022-08-13 13:27:49 +01:00
parent 18448dce5a
commit ad9276c071
6 changed files with 73 additions and 7 deletions

View File

@@ -31,7 +31,7 @@
</button>
<button
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-post="{% url 'threshold_irc_network_actions_list' net %}"
hx-post="{% url 'threshold_irc_network_list' net %}"
hx-trigger="click"
hx-target="#actions"
hx-swap="outerHTML"

View File

@@ -37,6 +37,16 @@
hx-swap="outerHTML">
</div>
<div
style="display: none;"
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-get="{% url 'threshold_irc_network_list' net %}"
hx-trigger="load"
hx-target="#stats"
hx-swap="outerHTML">
</div>
<div class="columns">
<div class="column">
<div class="box">
@@ -61,8 +71,8 @@
</div>
<div class="column">
<div class="box">
<div id="alerts">
Alerts here
<div id="stats">
Stats here
</div>
</div>
</div>

View File

@@ -0,0 +1,27 @@
<div id="stats">
{% include 'manage/threshold/partials/notify.html' %}
{% if list is not None %}
<div class="content" style="max-height: 30em; overflow: auto;">
<div class="table-container">
<table class="table is-fullwidth is-hoverable">
<thead>
<th>attribute</th>
<th>value</th>
</thead>
<tbody>
{% for key, item in list.items %}
<tr>
<th>{{ key }}</th>
<td>
{% if item is not None %}
{{ item }}
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endif %}
</div>