neptune/core/ui/views/drilldown.py

18 lines
556 B
Python
Raw Normal View History

2022-07-21 12:49:01 +00:00
from django.conf import settings
2022-07-21 12:46:34 +00:00
from django.contrib.auth.mixins import LoginRequiredMixin
from django.shortcuts import render
from django.views import View
2022-07-21 12:46:34 +00:00
class Drilldown(LoginRequiredMixin, View):
2022-07-21 12:51:55 +00:00
template_name = "ui/drilldown/drilldown.html"
plan_name = "drilldown"
2022-07-21 12:46:34 +00:00
def get(self, request):
if not request.user.has_plan(self.plan_name):
return render(request, "denied.html")
context = {
"sizes": settings.OPENSEARCH_MAIN_SIZES,
}
2022-07-21 12:49:11 +00:00
return render(request, self.template_name, context)