From 068de221c1b4d82844341d160fc810237eec5f55 Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Thu, 19 Dec 2019 17:00:29 -0500 Subject: [PATCH] second pass double checking all keys show up in the lists they should --- .../components/AddRole/AddResourceRole.jsx | 8 +++++ .../Lookup/InstanceGroupsLookup.jsx | 4 +++ .../src/components/Lookup/InventoryLookup.jsx | 10 +++--- .../NotificationList/NotificationList.jsx | 33 ++++++++++++------- .../src/screens/Host/HostList/HostList.jsx | 16 +++------ .../Inventory/InventoryList/InventoryList.jsx | 16 +++------ .../OrganizationList/OrganizationList.jsx | 8 +++++ .../OrganizationTeams/OrganizationTeams.jsx | 28 ++++++++++++++-- .../src/screens/Team/TeamList/TeamList.jsx | 8 +++++ 9 files changed, 88 insertions(+), 43 deletions(-) diff --git a/awx/ui_next/src/components/AddRole/AddResourceRole.jsx b/awx/ui_next/src/components/AddRole/AddResourceRole.jsx index 9327078808..9861bc5c24 100644 --- a/awx/ui_next/src/components/AddRole/AddResourceRole.jsx +++ b/awx/ui_next/src/components/AddRole/AddResourceRole.jsx @@ -179,6 +179,14 @@ class AddResourceRole extends React.Component { key: 'name', isDefault: true }, + { + name: i18n._(t`Created by (username)`), + key: 'created_by__username', + }, + { + name: i18n._(t`Modified by (username)`), + key: 'modified_by__username', + }, ]; const teamSortColumns = [ diff --git a/awx/ui_next/src/components/Lookup/InstanceGroupsLookup.jsx b/awx/ui_next/src/components/Lookup/InstanceGroupsLookup.jsx index 11e6f34f2a..87e59099c9 100644 --- a/awx/ui_next/src/components/Lookup/InstanceGroupsLookup.jsx +++ b/awx/ui_next/src/components/Lookup/InstanceGroupsLookup.jsx @@ -70,6 +70,10 @@ function InstanceGroupsLookup(props) { key: 'name', isDefault: true }, + { + name: i18n._(t`Credential name`), + key: 'credential__name' + }, { name: i18n._(t`Created by (username)`), key: 'created_by__username', diff --git a/awx/ui_next/src/components/Lookup/InventoryLookup.jsx b/awx/ui_next/src/components/Lookup/InventoryLookup.jsx index 3be88878d6..3e7f4e0be4 100644 --- a/awx/ui_next/src/components/Lookup/InventoryLookup.jsx +++ b/awx/ui_next/src/components/Lookup/InventoryLookup.jsx @@ -83,10 +83,12 @@ function InventoryLookup({ key: 'modified_by__username', }, ]} - sortColumns={[{ - name: i18n._(t`Name`), - key: 'name' - }]} + sortColumns={[ + { + name: i18n._(t`Name`), + key: 'name', + }, + ]} multiple={state.multiple} header={i18n._(t`Inventory`)} name="inventory" diff --git a/awx/ui_next/src/components/NotificationList/NotificationList.jsx b/awx/ui_next/src/components/NotificationList/NotificationList.jsx index 088f50d725..bd6d090dfd 100644 --- a/awx/ui_next/src/components/NotificationList/NotificationList.jsx +++ b/awx/ui_next/src/components/NotificationList/NotificationList.jsx @@ -11,6 +11,7 @@ import PaginatedDataList from '@components/PaginatedDataList'; import { getQSConfig, parseQueryString } from '@util/qs'; import { NotificationTemplatesAPI } from '@api'; +import { type } from 'os'; const QS_CONFIG = getQSConfig('notification', { page: 1, @@ -205,12 +206,28 @@ class NotificationList extends Component { isDefault: true }, { - name: i18n._(t`Modified`), - key: 'modified', + name: i18n._(t`Type`), + key: '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`), - key: 'created', + name: i18n._(t`Created by (username)`), + key: 'created_by__username', + }, + { + name: i18n._(t`Modified by (username)`), + key: 'modified_by__username', }, ]} toolbarSortColumns={[ @@ -218,14 +235,6 @@ class NotificationList extends Component { name: i18n._(t`Name`), key: 'name', }, - { - name: i18n._(t`Modified`), - key: 'modified', - }, - { - name: i18n._(t`Created`), - key: 'created', - }, ]} renderItem={notification => ( ( ( ); } @@ -55,4 +77,4 @@ OrganizationTeams.propTypes = { }; export { OrganizationTeams as _OrganizationTeams }; -export default OrganizationTeams; +export default withI18n()(OrganizationTeams); diff --git a/awx/ui_next/src/screens/Team/TeamList/TeamList.jsx b/awx/ui_next/src/screens/Team/TeamList/TeamList.jsx index bb1579295d..8048e82c63 100644 --- a/awx/ui_next/src/screens/Team/TeamList/TeamList.jsx +++ b/awx/ui_next/src/screens/Team/TeamList/TeamList.jsx @@ -164,6 +164,14 @@ class TeamsList extends Component { name: i18n._(t`Organization name`), key: 'organization__name', }, + { + name: i18n._(t`Created by (username)`), + key: 'created_by__username', + }, + { + name: i18n._(t`Modified by (username)`), + key: 'modified_by__username', + }, ]} toolbarSortColumns={[ {