You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
769 B
Python

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)