Finish Threshold stats and implement network listing

This commit is contained in:
2022-07-25 18:03:10 +01:00
parent c66055db9d
commit 45891cb0fb
10 changed files with 221 additions and 12 deletions

View File

@@ -0,0 +1,23 @@
from django.views import View
from django.shortcuts import render
from core.views.manage.permissions import SuperUserRequiredMixin
from core.lib.manage.threshold import get_irc_stats, get_irc_networks
class ThresholdIRCStats(SuperUserRequiredMixin, View):
stats_template = "dynamic/manage/threshold/irc/stats.html"
def post(self, request):
stats = get_irc_stats()
context = {"stats": stats}
return render(request, self.stats_template, context)
class ThresholdIRCNetworks(SuperUserRequiredMixin, View):
stats_template = "dynamic/manage/threshold/irc/networks.html"
def post(self, request):
stats = get_irc_networks()
context = {"networks": stats}
return render(request, self.stats_template, context)