Implement showing LIST information
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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>
|
||||
|
||||
27
core/templates/manage/threshold/irc/network/stats.html
Normal file
27
core/templates/manage/threshold/irc/network/stats.html
Normal 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>
|
||||
Reference in New Issue
Block a user