2018-12-10 02:11:54 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
#
|
2019-02-22 11:14:07 +00:00
|
|
|
from django.views.generic import TemplateView
|
2018-12-10 02:11:54 +00:00
|
|
|
|
2019-06-19 02:47:26 +00:00
|
|
|
from common.permissions import PermissionsMixin, IsOrgAdmin, IsAuditor
|
2018-12-10 02:11:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
__all__ = ['CeleryTaskLogView']
|
|
|
|
|
|
|
|
|
2019-06-19 02:47:26 +00:00
|
|
|
class CeleryTaskLogView(PermissionsMixin, TemplateView):
|
2018-12-10 02:11:54 +00:00
|
|
|
template_name = 'ops/celery_task_log.html'
|
2019-06-19 02:47:26 +00:00
|
|
|
permission_classes = [IsOrgAdmin | IsAuditor]
|
2019-01-15 02:23:30 +00:00
|
|
|
|
|
|
|
def get_context_data(self, **kwargs):
|
|
|
|
context = super().get_context_data(**kwargs)
|
|
|
|
context.update({'task_id': self.kwargs.get('pk')})
|
|
|
|
return context
|