|
|
@ -17,14 +17,16 @@ from ..serializers import (
|
|
|
|
AdHocDetailSerializer,
|
|
|
|
AdHocDetailSerializer,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
from ..tasks import run_ansible_task
|
|
|
|
from ..tasks import run_ansible_task
|
|
|
|
|
|
|
|
from orgs.mixins.api import OrgBulkModelViewSet
|
|
|
|
|
|
|
|
from orgs.utils import current_org
|
|
|
|
|
|
|
|
|
|
|
|
__all__ = [
|
|
|
|
__all__ = [
|
|
|
|
'TaskViewSet', 'TaskRun', 'AdHocViewSet', 'AdHocRunHistoryViewSet'
|
|
|
|
'TaskViewSet', 'TaskRun', 'AdHocViewSet', 'AdHocRunHistoryViewSet'
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TaskViewSet(JMSBulkModelViewSet):
|
|
|
|
class TaskViewSet(OrgBulkModelViewSet):
|
|
|
|
queryset = Task.objects.all()
|
|
|
|
model = Task
|
|
|
|
filterset_fields = ("name",)
|
|
|
|
filterset_fields = ("name",)
|
|
|
|
search_fields = filterset_fields
|
|
|
|
search_fields = filterset_fields
|
|
|
|
serializer_class = TaskSerializer
|
|
|
|
serializer_class = TaskSerializer
|
|
|
|