diff --git a/app/urls.py b/app/urls.py index b28d3a0..0f04ee6 100644 --- a/app/urls.py +++ b/app/urls.py @@ -37,6 +37,13 @@ from core.views.dynamic.insights import ( InsightsNicks, InsightsSearch, ) +from core.views.dynamic.manage.threshold.irc import ( + ThresholdIRCNetworks, + ThresholdIRCStats, +) + +# Management stuff +from core.views.manage.threshold import ThresholdIRCOverview urlpatterns = [ path("", Home.as_view(), name="home"), @@ -68,6 +75,22 @@ urlpatterns = [ path("ui/insights/meta/", InsightsMeta.as_view(), name="meta_insights"), path("ui/insights/modal/", InsightsInfoModal.as_view(), name="modal_insights"), ## + path( + "manage/threshold/irc/overview/", + ThresholdIRCOverview.as_view(), + name="threshold_irc_overview", + ), + path( + "manage/threshold/irc/stats/", + ThresholdIRCStats.as_view(), + name="threshold_irc_stats", + ), + path( + "manage/threshold/irc/networks/", + ThresholdIRCNetworks.as_view(), + name="threshold_irc_networks", + ), + ## path("api/chans/", ThresholdChans.as_view(), name="chans"), path("api/users/", ThresholdUsers.as_view(), name="users"), path("api/online/", ThresholdOnline.as_view(), name="online"), diff --git a/core/lib/manage/threshold.py b/core/lib/manage/threshold.py new file mode 100644 index 0000000..c27c0c3 --- /dev/null +++ b/core/lib/manage/threshold.py @@ -0,0 +1,18 @@ +from core.lib.threshold import threshold_request + +def get_irc_stats(): + url = "irc/stats" + payload = {} + stats = threshold_request(url, payload) + if not stats: + return {} + print("tsats", stats) + 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 diff --git a/core/templates/base.html b/core/templates/base.html index 0f413fd..30c7d2e 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -123,7 +123,7 @@