mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 01:17:37 -02:30
Merge pull request #10716 from oweel/10392-return_404_ad_hoc_command_events
Return 404 for ad_hoc_command_events list api. Remove api endtpoint
This commit is contained in:
@@ -3,11 +3,10 @@
|
|||||||
|
|
||||||
from django.conf.urls import url
|
from django.conf.urls import url
|
||||||
|
|
||||||
from awx.api.views import AdHocCommandEventList, AdHocCommandEventDetail
|
from awx.api.views import AdHocCommandEventDetail
|
||||||
|
|
||||||
|
|
||||||
urls = [
|
urls = [
|
||||||
url(r'^$', AdHocCommandEventList.as_view(), name='ad_hoc_command_event_list'),
|
|
||||||
url(r'^(?P<pk>[0-9]+)/$', AdHocCommandEventDetail.as_view(), name='ad_hoc_command_event_detail'),
|
url(r'^(?P<pk>[0-9]+)/$', AdHocCommandEventDetail.as_view(), name='ad_hoc_command_event_detail'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -3906,18 +3906,6 @@ class AdHocCommandRelaunch(GenericAPIView):
|
|||||||
return Response(data, status=status.HTTP_201_CREATED, headers=headers)
|
return Response(data, status=status.HTTP_201_CREATED, headers=headers)
|
||||||
|
|
||||||
|
|
||||||
class AdHocCommandEventList(NoTruncateMixin, ListAPIView):
|
|
||||||
|
|
||||||
model = models.AdHocCommandEvent
|
|
||||||
serializer_class = serializers.AdHocCommandEventSerializer
|
|
||||||
search_fields = ('stdout',)
|
|
||||||
|
|
||||||
def get_queryset(self):
|
|
||||||
adhoc = self.get_parent_object()
|
|
||||||
self.check_parent_access(adhoc)
|
|
||||||
return adhoc.get_event_queryset()
|
|
||||||
|
|
||||||
|
|
||||||
class AdHocCommandEventDetail(RetrieveAPIView):
|
class AdHocCommandEventDetail(RetrieveAPIView):
|
||||||
|
|
||||||
model = models.AdHocCommandEvent
|
model = models.AdHocCommandEvent
|
||||||
|
|||||||
Reference in New Issue
Block a user