-
+
diff --git a/core/templates/ui/insights/nicks.html b/core/templates/ui/insights/nicks.html
index b59f3d7..8d8c4ab 100644
--- a/core/templates/ui/insights/nicks.html
+++ b/core/templates/ui/insights/nicks.html
@@ -1,18 +1,41 @@
+{% load index %}
+
{% for nick in nicks %}
+ {% if nick in online %}
+ {% if online|index:nick is True %}
+
+
+
+ {% elif online|index:nick is False %}
+
+
+
+ {% else %}
+
+
+
+ {% endif %}
+ {% endif %}
{{ nick }}
+
+
+
|
{% endfor %}
diff --git a/core/views/dynamic/insights.py b/core/views/dynamic/insights.py
index a79d42b..e41c4af 100644
--- a/core/views/dynamic/insights.py
+++ b/core/views/dynamic/insights.py
@@ -10,6 +10,7 @@ from core.lib.opensearch import query_single_result
from core.lib.threshold import (
annotate_num_chans,
annotate_num_users,
+ annotate_online,
get_chans,
get_users,
)
@@ -66,9 +67,10 @@ class InsightsNicks(LoginRequiredMixin, APIView):
net = request.data["net"]
nick = request.data["nick"]
nicks = get_nicks(request, net, nick)
+ online = annotate_online(net, nicks)
if not nicks:
return HttpResponseForbidden()
- context = {"net": net, "nick": nick, "nicks": nicks}
+ context = {"net": net, "nick": nick, "nicks": nicks, "online": online}
return render(request, self.template_name, context)