From fa53e11ff0cc32f50a2b7d87bc0f9452e4cf8c38 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Mon, 1 Aug 2022 21:39:11 +0100 Subject: [PATCH] Implement running list on a network --- app/urls.py | 6 ++++ core/lib/manage/threshold.py | 7 +++++ .../manage/threshold/irc/network/actions.html | 4 +++ core/views/manage/threshold/irc.py | 28 +++++++++++++++++++ 4 files changed, 45 insertions(+) diff --git a/app/urls.py b/app/urls.py index 2aebd43..91e2ef0 100644 --- a/app/urls.py +++ b/app/urls.py @@ -28,6 +28,7 @@ from core.views.manage.threshold.irc import ( ThresholdIRCAliasesEdit, ThresholdIRCNetworkActions, ThresholdIRCNetworkActionsAuto, + ThresholdIRCNetworkActionsList, ThresholdIRCNetworkActionsRelay, ThresholdIRCNetworkChannels, ThresholdIRCNetworkInfo, @@ -177,6 +178,11 @@ urlpatterns = [ ThresholdIRCNetworkActionsAuto.as_view(), name="threshold_irc_network_actions_auto", ), + path( + "manage/threshold/irc/list//", + ThresholdIRCNetworkActionsList.as_view(), + name="threshold_irc_network_actions_list", + ), ## path("api/chans/", ThresholdChans.as_view(), name="chans"), path("api/users/", ThresholdUsers.as_view(), name="users"), diff --git a/core/lib/manage/threshold.py b/core/lib/manage/threshold.py index 064be53..2b2f483 100644 --- a/core/lib/manage/threshold.py +++ b/core/lib/manage/threshold.py @@ -118,3 +118,10 @@ def run_auto(net): payload = {} deleted = threshold_request(url, payload, method="POST") return deleted + + +def run_list(net): + url = f"irc/list/{net}" + payload = {} + ran = threshold_request(url, payload, method="POST") + return ran diff --git a/core/templates/manage/threshold/irc/network/actions.html b/core/templates/manage/threshold/irc/network/actions.html index 19ef3eb..6154f80 100644 --- a/core/templates/manage/threshold/irc/network/actions.html +++ b/core/templates/manage/threshold/irc/network/actions.html @@ -35,6 +35,10 @@