From 1a33f7ce1a615960ee475be0ae15889698cefb02 Mon Sep 17 00:00:00 2001 From: Marliana Lara Date: Wed, 18 Nov 2020 16:00:02 -0500 Subject: [PATCH] Fix notification template type search query key --- .../NotificationList/NotificationList.jsx | 10 ++++++++- .../NotificationTemplateList.jsx | 22 ++++++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/awx/ui_next/src/components/NotificationList/NotificationList.jsx b/awx/ui_next/src/components/NotificationList/NotificationList.jsx index 49cfce25fb..35a77b52f3 100644 --- a/awx/ui_next/src/components/NotificationList/NotificationList.jsx +++ b/awx/ui_next/src/components/NotificationList/NotificationList.jsx @@ -182,9 +182,13 @@ function NotificationList({ key: 'name__icontains', isDefault: true, }, + { + name: i18n._(t`Description`), + key: 'description__icontains', + }, { name: i18n._(t`Type`), - key: 'or__type', + key: 'or__notification_type', options: [ ['email', i18n._(t`Email`)], ['grafana', i18n._(t`Grafana`)], @@ -212,6 +216,10 @@ function NotificationList({ name: i18n._(t`Name`), key: 'name', }, + { + name: i18n._(t`Type`), + key: 'notification_type', + }, ]} toolbarSearchableKeys={searchableKeys} toolbarRelatedSearchableKeys={relatedSearchableKeys} diff --git a/awx/ui_next/src/screens/NotificationTemplate/NotificationTemplateList/NotificationTemplateList.jsx b/awx/ui_next/src/screens/NotificationTemplate/NotificationTemplateList/NotificationTemplateList.jsx index 96bad47c5d..e31fd10617 100644 --- a/awx/ui_next/src/screens/NotificationTemplate/NotificationTemplateList/NotificationTemplateList.jsx +++ b/awx/ui_next/src/screens/NotificationTemplate/NotificationTemplateList/NotificationTemplateList.jsx @@ -110,7 +110,27 @@ function NotificationTemplatesList({ i18n }) { }, { name: i18n._(t`Type`), - key: 'notification_type', + key: 'or__notification_type', + options: [ + ['email', i18n._(t`Email`)], + ['grafana', i18n._(t`Grafana`)], + ['hipchat', i18n._(t`Hipchat`)], + ['irc', i18n._(t`IRC`)], + ['mattermost', i18n._(t`Mattermost`)], + ['pagerduty', i18n._(t`Pagerduty`)], + ['rocketchat', i18n._(t`Rocket.Chat`)], + ['slack', i18n._(t`Slack`)], + ['twilio', i18n._(t`Twilio`)], + ['webhook', i18n._(t`Webhook`)], + ], + }, + { + name: i18n._(t`Created By (Username)`), + key: 'created_by__username__icontains', + }, + { + name: i18n._(t`Modified By (Username)`), + key: 'modified_by__username__icontains', }, ]} toolbarSortColumns={[