Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a route to AA to get notifications #14402

Draft
wants to merge 1 commit into
base: devel
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions awx/api/urls/analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
re_path(r'^probe_template_for_hosts_options/$', analytics.AnalyticsProbeTemplateForHostsList.as_view(), name='analytics_probe_template_for_hosts_options'),
re_path(r'^roi_templates/$', analytics.AnalyticsRoiTemplatesList.as_view(), name='analytics_roi_templates_explorer'),
re_path(r'^roi_templates_options/$', analytics.AnalyticsRoiTemplatesList.as_view(), name='analytics_roi_templates_options'),
re_path(r'^notifications/$', analytics.AnalyticsNotifications.as_view(), name='analytics_notifications'),
]

__all__ = ['urls']
4 changes: 4 additions & 0 deletions awx/api/views/analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def get(self, request, format=None):
data['probe_template_for_hosts_options'] = reverse('api:analytics_probe_template_for_hosts_options')
data['roi_templates'] = reverse('api:analytics_roi_templates_explorer')
data['roi_templates_options'] = reverse('api:analytics_roi_templates_options')
data['notifications'] = reverse('api:analytics_notifications')
return Response(data)


Expand Down Expand Up @@ -294,3 +295,6 @@ class AnalyticsProbeTemplateForHostsList(GetNotAllowedMixin, AnalyticsGenericLis

class AnalyticsRoiTemplatesList(GetNotAllowedMixin, AnalyticsGenericListView):
name = _("ROI Templates")

class AnalyticsNotifications(AnalyticsGenericListView):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ZitaNemeckova is it going to be GET or POST request?

name = _("Analytics Notifications")
Loading