Add online status and jumping to nick to Insights page
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user