From 0edcd688a238ab78718d37c664888a08853697f7 Mon Sep 17 00:00:00 2001 From: Erez Tamam Date: Wed, 12 Jul 2023 22:11:47 +0300 Subject: [PATCH] add organization column notification template list (#13998) --- .../NotificationTemplateList.js | 1 + .../NotificationTemplateList.test.js | 12 ++++++++++++ .../NotificationTemplateListItem.js | 7 +++++++ .../NotificationTemplateListItem.test.js | 10 +++++++++- 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/awx/ui/src/screens/NotificationTemplate/NotificationTemplateList/NotificationTemplateList.js b/awx/ui/src/screens/NotificationTemplate/NotificationTemplateList/NotificationTemplateList.js index defa2ef920..5172fa3f38 100644 --- a/awx/ui/src/screens/NotificationTemplate/NotificationTemplateList/NotificationTemplateList.js +++ b/awx/ui/src/screens/NotificationTemplate/NotificationTemplateList/NotificationTemplateList.js @@ -178,6 +178,7 @@ function NotificationTemplatesList() { {t`Name`} {t`Status`} {t`Type`} + {t`Organization`} {t`Actions`} } diff --git a/awx/ui/src/screens/NotificationTemplate/NotificationTemplateList/NotificationTemplateList.test.js b/awx/ui/src/screens/NotificationTemplate/NotificationTemplateList/NotificationTemplateList.test.js index aa7c73724c..98493f4b5b 100644 --- a/awx/ui/src/screens/NotificationTemplate/NotificationTemplateList/NotificationTemplateList.test.js +++ b/awx/ui/src/screens/NotificationTemplate/NotificationTemplateList/NotificationTemplateList.test.js @@ -20,6 +20,10 @@ const mockTemplates = { url: '/notification_templates/1', type: 'slack', summary_fields: { + organization: { + id: 1, + name: 'Foo', + }, recent_notifications: [ { status: 'success', @@ -36,6 +40,10 @@ const mockTemplates = { id: 2, url: '/notification_templates/2', summary_fields: { + organization: { + id: 2, + name: 'Bar', + }, recent_notifications: [], user_capabilities: { delete: true, @@ -48,6 +56,10 @@ const mockTemplates = { id: 3, url: '/notification_templates/3', summary_fields: { + organization: { + id: 3, + name: 'Test', + }, recent_notifications: [ { status: 'failed', diff --git a/awx/ui/src/screens/NotificationTemplate/NotificationTemplateList/NotificationTemplateListItem.js b/awx/ui/src/screens/NotificationTemplate/NotificationTemplateList/NotificationTemplateListItem.js index ef98cdbd0f..a30a91f892 100644 --- a/awx/ui/src/screens/NotificationTemplate/NotificationTemplateList/NotificationTemplateListItem.js +++ b/awx/ui/src/screens/NotificationTemplate/NotificationTemplateList/NotificationTemplateListItem.js @@ -121,6 +121,13 @@ function NotificationTemplateListItem({ {NOTIFICATION_TYPES[template.notification_type] || template.notification_type} + + + {template.summary_fields.organization.name} + +