Implement joining and parting channels
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
import json
|
||||
|
||||
from django.conf import settings
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.http import HttpResponse, HttpResponseForbidden, JsonResponse
|
||||
from django.shortcuts import render
|
||||
from django.views import View
|
||||
from django.http import HttpResponse, HttpResponseForbidden, JsonResponse
|
||||
from rest_framework.parsers import FormParser
|
||||
from rest_framework.views import APIView
|
||||
import json
|
||||
|
||||
from core.lib.opensearch import query_results
|
||||
|
||||
|
||||
from core.lib.threshold import (
|
||||
annotate_num_chans,
|
||||
annotate_num_users,
|
||||
@@ -16,6 +16,7 @@ from core.lib.threshold import (
|
||||
get_users,
|
||||
)
|
||||
|
||||
|
||||
class Drilldown(LoginRequiredMixin, View):
|
||||
template_name = "ui/drilldown/drilldown.html"
|
||||
plan_name = "drilldown"
|
||||
@@ -28,6 +29,7 @@ class Drilldown(LoginRequiredMixin, View):
|
||||
}
|
||||
return render(request, self.template_name, context)
|
||||
|
||||
|
||||
class DrilldownSearch(LoginRequiredMixin, View):
|
||||
# parser_classes = [JSONParser]
|
||||
template_name = "ui/drilldown/results.html"
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
from ast import literal_eval
|
||||
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.http import HttpResponse, HttpResponseForbidden, JsonResponse
|
||||
from django.shortcuts import render
|
||||
from django.views import View
|
||||
from rest_framework.parsers import FormParser
|
||||
from django.http import HttpResponse, HttpResponseForbidden, JsonResponse
|
||||
|
||||
from rest_framework.views import APIView
|
||||
|
||||
from core.lib.meta import get_meta
|
||||
from core.lib.nicktrace import get_nicks
|
||||
from core.lib.opensearch import query_single_result
|
||||
@@ -15,7 +17,6 @@ from core.lib.threshold import (
|
||||
get_chans,
|
||||
get_users,
|
||||
)
|
||||
from ast import literal_eval
|
||||
|
||||
|
||||
class Insights(LoginRequiredMixin, View):
|
||||
@@ -27,6 +28,7 @@ class Insights(LoginRequiredMixin, View):
|
||||
return render(request, "denied.html")
|
||||
return render(request, self.template_name)
|
||||
|
||||
|
||||
class InsightsSearch(LoginRequiredMixin, View):
|
||||
# parser_classes = [JSONParser]
|
||||
template_name = "ui/insights/info.html"
|
||||
|
||||
Reference in New Issue
Block a user