From ad9276c0711d75c7d4fcfea95925f7249be5715c Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Sat, 13 Aug 2022 13:27:49 +0100 Subject: [PATCH] Implement showing LIST information --- app/urls.py | 6 ++--- core/lib/manage/threshold.py | 7 +++++ .../manage/threshold/irc/network/actions.html | 2 +- .../manage/threshold/irc/network/network.html | 14 ++++++++-- .../manage/threshold/irc/network/stats.html | 27 +++++++++++++++++++ core/views/manage/threshold/irc.py | 24 ++++++++++++++++- 6 files changed, 73 insertions(+), 7 deletions(-) create mode 100644 core/templates/manage/threshold/irc/network/stats.html diff --git a/app/urls.py b/app/urls.py index b5c0934..651e13b 100644 --- a/app/urls.py +++ b/app/urls.py @@ -30,7 +30,7 @@ from core.views.manage.threshold.irc import ( ThresholdIRCAliasesEdit, ThresholdIRCNetworkActions, ThresholdIRCNetworkActionsAuto, - ThresholdIRCNetworkActionsList, + ThresholdIRCNetworkList, # Actions and just get list output ThresholdIRCNetworkActionsRelay, ThresholdIRCNetworkChannels, ThresholdIRCNetworkDel, @@ -212,8 +212,8 @@ urlpatterns = [ ), path( "manage/threshold/irc/list//", - ThresholdIRCNetworkActionsList.as_view(), - name="threshold_irc_network_actions_list", + ThresholdIRCNetworkList.as_view(), + name="threshold_irc_network_list", ), path( "manage/threshold/irc/msg////", diff --git a/core/lib/manage/threshold.py b/core/lib/manage/threshold.py index ac20a42..0f15b91 100644 --- a/core/lib/manage/threshold.py +++ b/core/lib/manage/threshold.py @@ -210,3 +210,10 @@ def get_irc_nick(net, num): payload = {} 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 \ No newline at end of file diff --git a/core/templates/manage/threshold/irc/network/actions.html b/core/templates/manage/threshold/irc/network/actions.html index 667278b..5d82e9e 100644 --- a/core/templates/manage/threshold/irc/network/actions.html +++ b/core/templates/manage/threshold/irc/network/actions.html @@ -31,7 +31,7 @@