Fix notification template type search query key

This commit is contained in:
Marliana Lara 2020-11-18 16:00:02 -05:00
parent 2f47bacb4f
commit 1a33f7ce1a
No known key found for this signature in database
GPG Key ID: 38C73B40DFA809EE
2 changed files with 30 additions and 2 deletions

View File

@ -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}

View File

@ -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={[