mirror of
https://github.com/ansible/awx.git
synced 2026-03-04 10:11:05 -03:30
Make changes to support capture by the activity stream
Including exposing a new API view for a particular EE's activity stream objects.
This commit is contained in:
committed by
Shane McDonald
parent
5ec7378135
commit
f9741b619c
@@ -700,6 +700,22 @@ class ExecutionEnvironmentDetail(RetrieveUpdateDestroyAPIView):
|
||||
swagger_topic = "Execution Environments"
|
||||
|
||||
|
||||
class ExecutionEnvironmentActivityStreamList(SubListAPIView):
|
||||
|
||||
model = models.ActivityStream
|
||||
serializer_class = serializers.ActivityStreamSerializer
|
||||
parent_model = models.ExecutionEnvironment
|
||||
relationship = 'activitystream_set'
|
||||
search_fields = ('changes',)
|
||||
|
||||
def get_queryset(self):
|
||||
parent = self.get_parent_object()
|
||||
self.check_parent_access(parent)
|
||||
|
||||
qs = self.request.user.get_queryset(self.model)
|
||||
return qs.filter(execution_environment=parent)
|
||||
|
||||
|
||||
class ProjectList(ListCreateAPIView):
|
||||
|
||||
model = models.Project
|
||||
|
||||
Reference in New Issue
Block a user