diff --git a/core/lib/manage/threshold.py b/core/lib/manage/threshold.py index 149dca4..63ac178 100644 --- a/core/lib/manage/threshold.py +++ b/core/lib/manage/threshold.py @@ -1,5 +1,6 @@ from core.lib.threshold import threshold_request + def get_irc_stats(): url = "irc/stats" payload = {} @@ -8,10 +9,11 @@ def get_irc_stats(): return {} return stats + def get_irc_networks(): url = "irc/networks" payload = {} networks = threshold_request(url, payload) if not networks: return {} - return networks \ No newline at end of file + return networks diff --git a/core/templates/dynamic/manage/threshold/irc/networks.html b/core/templates/dynamic/manage/threshold/irc/networks.html index 19971a5..e7943cc 100644 --- a/core/templates/dynamic/manage/threshold/irc/networks.html +++ b/core/templates/dynamic/manage/threshold/irc/networks.html @@ -2,33 +2,33 @@
- + {% for key, net in networks.items %} - - - - - - + + + + + + {% endfor %}
namenet relays channels records
{{ key }} - - - - {{ net.relays }} - - - - - {{ net.channels }} - - - - - {{ net.records }} -
{{ key }} + + + + {{ net.relays }} + + + + + {{ net.channels }} + + + + + {{ net.records }} +
diff --git a/core/templates/dynamic/manage/threshold/irc/stats.html b/core/templates/dynamic/manage/threshold/irc/stats.html index b03bde3..2d4408f 100644 --- a/core/templates/dynamic/manage/threshold/irc/stats.html +++ b/core/templates/dynamic/manage/threshold/irc/stats.html @@ -1,57 +1,49 @@
- - - - - - - - - - - - - - - - - - - - +
Xtotalunique
total - {{ stats.servers_total_total }} - - {{ stats.servers_total_unique }} -
online - {{ stats.servers_online_total }} - - {{ stats.servers_online_unique }} -
+ + + + + + + + + + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - -
attributecount
relays + {{ stats.servers_online_total }}/{{ stats.servers_total_total }} +
networks + {{ stats.servers_online_unique }}/{{ stats.servers_total_unique }} +
channels - {{ stats.channels}} -
channels + {{ stats.channels}} +
records - {{ stats.records }} -
events - {{ stats.eventrate }} -
records + {{ stats.records }} +
events + {{ stats.eventrate }} +
+ +
\ No newline at end of file diff --git a/core/templates/manage/threshold/irc/overview.html b/core/templates/manage/threshold/irc/overview.html index 0be48e3..7dbf810 100644 --- a/core/templates/manage/threshold/irc/overview.html +++ b/core/templates/manage/threshold/irc/overview.html @@ -1,51 +1,51 @@ {% extends "base.html" %} {% block content %} -
-
+
+
-
-
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
{% endblock %} diff --git a/core/views/dynamic/manage/threshold/irc.py b/core/views/dynamic/manage/threshold/irc.py index fed2fc9..288087f 100644 --- a/core/views/dynamic/manage/threshold/irc.py +++ b/core/views/dynamic/manage/threshold/irc.py @@ -1,12 +1,13 @@ -from django.views import View from django.shortcuts import render +from django.views import View + +from core.lib.manage.threshold import get_irc_networks, get_irc_stats 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} @@ -16,8 +17,7 @@ class ThresholdIRCStats(SuperUserRequiredMixin, View): 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) \ No newline at end of file + return render(request, self.stats_template, context)