Reformat IRC list getter
This commit is contained in:
parent
ad9276c071
commit
cf9da35df7
|
@ -23,6 +23,9 @@ from django.views.generic import TemplateView
|
||||||
from core.api.views.threshold import ThresholdChans, ThresholdOnline, ThresholdUsers
|
from core.api.views.threshold import ThresholdChans, ThresholdOnline, ThresholdUsers
|
||||||
from core.views import About, Billing, Cancel, Order, Portal, Signup
|
from core.views import About, Billing, Cancel, Order, Portal, Signup
|
||||||
from core.views.callbacks import Callback
|
from core.views.callbacks import Callback
|
||||||
|
from core.views.manage.threshold.irc import (
|
||||||
|
ThresholdIRCNetworkList, # Actions and just get list output
|
||||||
|
)
|
||||||
from core.views.manage.threshold.irc import (
|
from core.views.manage.threshold.irc import (
|
||||||
ThresholdIRCActions,
|
ThresholdIRCActions,
|
||||||
ThresholdIRCActionsAddNetwork,
|
ThresholdIRCActionsAddNetwork,
|
||||||
|
@ -30,7 +33,6 @@ from core.views.manage.threshold.irc import (
|
||||||
ThresholdIRCAliasesEdit,
|
ThresholdIRCAliasesEdit,
|
||||||
ThresholdIRCNetworkActions,
|
ThresholdIRCNetworkActions,
|
||||||
ThresholdIRCNetworkActionsAuto,
|
ThresholdIRCNetworkActionsAuto,
|
||||||
ThresholdIRCNetworkList, # Actions and just get list output
|
|
||||||
ThresholdIRCNetworkActionsRelay,
|
ThresholdIRCNetworkActionsRelay,
|
||||||
ThresholdIRCNetworkChannels,
|
ThresholdIRCNetworkChannels,
|
||||||
ThresholdIRCNetworkDel,
|
ThresholdIRCNetworkDel,
|
||||||
|
|
|
@ -211,9 +211,9 @@ def get_irc_nick(net, num):
|
||||||
nick = threshold_request(url, payload, method="GET")
|
nick = threshold_request(url, payload, method="GET")
|
||||||
return nick
|
return nick
|
||||||
|
|
||||||
|
|
||||||
def get_irc_list_info(net):
|
def get_irc_list_info(net):
|
||||||
url = f"irc/list/{net}"
|
url = f"irc/list/{net}"
|
||||||
payload = {}
|
payload = {}
|
||||||
listinfo = threshold_request(url, payload, method="GET")
|
listinfo = threshold_request(url, payload, method="GET")
|
||||||
print("LISTINFO", listinfo)
|
return listinfo
|
||||||
return listinfo
|
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
<div id="stats">
|
<div id="stats">
|
||||||
{% include 'manage/threshold/partials/notify.html' %}
|
{% include 'manage/threshold/partials/notify.html' %}
|
||||||
{% if list is not None %}
|
{% if list is not None %}
|
||||||
<div class="content" style="max-height: 30em; overflow: auto;">
|
<div class="content" style="max-height: 30em; overflow: auto;">
|
||||||
<div class="table-container">
|
<div class="table-container">
|
||||||
<table class="table is-fullwidth is-hoverable">
|
<table class="table is-fullwidth is-hoverable">
|
||||||
<thead>
|
<thead>
|
||||||
<th>attribute</th>
|
<th>attribute</th>
|
||||||
<th>value</th>
|
<th>value</th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for key, item in list.items %}
|
{% for key, item in list.items %}
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{ key }}</th>
|
<th>{{ key }}</th>
|
||||||
<td>
|
<td>
|
||||||
{% if item is not None %}
|
{% if item is not None %}
|
||||||
{{ item }}
|
{{ item }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
|
</div>
|
Loading…
Reference in New Issue