2022-07-25 17:03:10 +00:00
|
|
|
from django.shortcuts import render
|
2022-07-25 18:08:28 +00:00
|
|
|
from django.views import View
|
|
|
|
|
|
|
|
from core.lib.manage.threshold import get_irc_networks, get_irc_stats
|
2022-07-25 17:03:10 +00:00
|
|
|
from core.views.manage.permissions import SuperUserRequiredMixin
|
2022-07-25 18:08:28 +00:00
|
|
|
|
2022-07-25 17:03:10 +00:00
|
|
|
|
|
|
|
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}
|
2022-07-25 18:08:28 +00:00
|
|
|
return render(request, self.stats_template, context)
|