Reformat IRC list getter

This commit is contained in:
2022-08-13 13:32:03 +01:00
parent ad9276c071
commit cf9da35df7
3 changed files with 30 additions and 28 deletions

View File

@@ -211,9 +211,9 @@ def get_irc_nick(net, num):
nick = threshold_request(url, payload, method="GET")
return nick
def get_irc_list_info(net):
url = f"irc/list/{net}"
payload = {}
listinfo = threshold_request(url, payload, method="GET")
print("LISTINFO", listinfo)
return listinfo
return listinfo

View File

@@ -1,27 +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>
{% 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>
{% endif %}
</div>
</div>
{% endif %}
</div>