From 1f74801174244179714dbdcffdede009ede0cc06 Mon Sep 17 00:00:00 2001 From: Zita Nemeckova Date: Wed, 30 Aug 2023 15:16:29 +0200 Subject: [PATCH] Add a route to AA to get notifications --- awx/api/urls/analytics.py | 1 + awx/api/views/analytics.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/awx/api/urls/analytics.py b/awx/api/urls/analytics.py index c8601c881d5b..ff1830e97f43 100644 --- a/awx/api/urls/analytics.py +++ b/awx/api/urls/analytics.py @@ -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'] diff --git a/awx/api/views/analytics.py b/awx/api/views/analytics.py index 9f6066084f32..10d3de940374 100644 --- a/awx/api/views/analytics.py +++ b/awx/api/views/analytics.py @@ -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) @@ -294,3 +295,6 @@ class AnalyticsProbeTemplateForHostsList(GetNotAllowedMixin, AnalyticsGenericLis class AnalyticsRoiTemplatesList(GetNotAllowedMixin, AnalyticsGenericListView): name = _("ROI Templates") + +class AnalyticsNotifications(AnalyticsGenericListView): + name = _("Analytics Notifications")