mirror of
https://github.com/ansible/awx.git
synced 2026-02-26 15:36:04 -03:30
Add notifications link to ad_hoc command details.
This commit is contained in:
@@ -2081,6 +2081,7 @@ class AdHocCommandSerializer(UnifiedJobSerializer):
|
|||||||
res.update(dict(
|
res.update(dict(
|
||||||
events = reverse('api:ad_hoc_command_ad_hoc_command_events_list', args=(obj.pk,)),
|
events = reverse('api:ad_hoc_command_ad_hoc_command_events_list', args=(obj.pk,)),
|
||||||
activity_stream = reverse('api:ad_hoc_command_activity_stream_list', args=(obj.pk,)),
|
activity_stream = reverse('api:ad_hoc_command_activity_stream_list', args=(obj.pk,)),
|
||||||
|
notifications = reverse('api:ad_hoc_command_notifications_list', args=(obj.pk,)),
|
||||||
))
|
))
|
||||||
res['cancel'] = reverse('api:ad_hoc_command_cancel', args=(obj.pk,))
|
res['cancel'] = reverse('api:ad_hoc_command_cancel', args=(obj.pk,))
|
||||||
res['relaunch'] = reverse('api:ad_hoc_command_relaunch', args=(obj.pk,))
|
res['relaunch'] = reverse('api:ad_hoc_command_relaunch', args=(obj.pk,))
|
||||||
|
|||||||
@@ -228,6 +228,7 @@ ad_hoc_command_urls = patterns('awx.api.views',
|
|||||||
url(r'^(?P<pk>[0-9]+)/relaunch/$', 'ad_hoc_command_relaunch'),
|
url(r'^(?P<pk>[0-9]+)/relaunch/$', 'ad_hoc_command_relaunch'),
|
||||||
url(r'^(?P<pk>[0-9]+)/events/$', 'ad_hoc_command_ad_hoc_command_events_list'),
|
url(r'^(?P<pk>[0-9]+)/events/$', 'ad_hoc_command_ad_hoc_command_events_list'),
|
||||||
url(r'^(?P<pk>[0-9]+)/activity_stream/$', 'ad_hoc_command_activity_stream_list'),
|
url(r'^(?P<pk>[0-9]+)/activity_stream/$', 'ad_hoc_command_activity_stream_list'),
|
||||||
|
url(r'^(?P<pk>[0-9]+)/notifications/$', 'ad_hoc_command_notifications_list'),
|
||||||
url(r'^(?P<pk>[0-9]+)/stdout/$', 'ad_hoc_command_stdout'),
|
url(r'^(?P<pk>[0-9]+)/stdout/$', 'ad_hoc_command_stdout'),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -3300,6 +3300,14 @@ class AdHocCommandActivityStreamList(SubListAPIView):
|
|||||||
return super(AdHocCommandActivityStreamList, self).get(request, *args, **kwargs)
|
return super(AdHocCommandActivityStreamList, self).get(request, *args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
class AdHocCommandNotificationsList(SubListAPIView):
|
||||||
|
|
||||||
|
model = Notification
|
||||||
|
serializer_class = NotificationSerializer
|
||||||
|
parent_model = AdHocCommand
|
||||||
|
relationship = 'notifications'
|
||||||
|
|
||||||
|
|
||||||
class SystemJobList(ListCreateAPIView):
|
class SystemJobList(ListCreateAPIView):
|
||||||
|
|
||||||
model = SystemJob
|
model = SystemJob
|
||||||
|
|||||||
Reference in New Issue
Block a user