From 5a1810e191d9b4e4c0f0d1c723331bed24601816 Mon Sep 17 00:00:00 2001 From: Alex Corey Date: Fri, 7 May 2021 11:26:50 -0400 Subject: [PATCH] fxes pagination and removes console warnings --- .../AppContainer/NavExpandableGroup.jsx | 2 +- .../src/components/Pagination/Pagination.jsx | 1 - .../Team/TeamRoles/TeamRoleListItem.jsx | 21 +++++++------------ .../screens/Team/TeamRoles/TeamRolesList.jsx | 4 ++-- 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/awx/ui_next/src/components/AppContainer/NavExpandableGroup.jsx b/awx/ui_next/src/components/AppContainer/NavExpandableGroup.jsx index 45c3b91fae..80d7c2dc2c 100644 --- a/awx/ui_next/src/components/AppContainer/NavExpandableGroup.jsx +++ b/awx/ui_next/src/components/AppContainer/NavExpandableGroup.jsx @@ -59,7 +59,7 @@ class NavExpandableGroup extends Component { NavExpandableGroup.propTypes = { groupId: PropTypes.string.isRequired, - groupTitle: PropTypes.string.isRequired, + groupTitle: PropTypes.element.isRequired, routes: PropTypes.arrayOf(PropTypes.object).isRequired, }; diff --git a/awx/ui_next/src/components/Pagination/Pagination.jsx b/awx/ui_next/src/components/Pagination/Pagination.jsx index 139cda4ad4..dbf4b3e092 100644 --- a/awx/ui_next/src/components/Pagination/Pagination.jsx +++ b/awx/ui_next/src/components/Pagination/Pagination.jsx @@ -4,7 +4,6 @@ import { Pagination as PFPagination, DropdownDirection, } from '@patternfly/react-core'; -import {} from '@lingui/core'; import { t } from '@lingui/macro'; const AWXPagination = styled(PFPagination)` diff --git a/awx/ui_next/src/screens/Team/TeamRoles/TeamRoleListItem.jsx b/awx/ui_next/src/screens/Team/TeamRoles/TeamRoleListItem.jsx index ac6f3e75d7..d298faa65f 100644 --- a/awx/ui_next/src/screens/Team/TeamRoles/TeamRoleListItem.jsx +++ b/awx/ui_next/src/screens/Team/TeamRoles/TeamRoleListItem.jsx @@ -5,7 +5,6 @@ import { Chip } from '@patternfly/react-core'; import { Tr, Td } from '@patternfly/react-table'; import { Link } from 'react-router-dom'; -import { Detail } from '../../../components/DetailList'; function TeamRoleListItem({ role, detailUrl, onDisassociate }) { return ( @@ -19,18 +18,14 @@ function TeamRoleListItem({ role, detailUrl, onDisassociate }) { {role.summary_fields.resource_type_display_name} - onDisassociate(role)} - isReadOnly={!role.summary_fields.user_capabilities.unattach} - > - {role.name} - - } - /> + onDisassociate(role)} + isReadOnly={!role.summary_fields.user_capabilities.unattach} + > + {role.name} + ); diff --git a/awx/ui_next/src/screens/Team/TeamRoles/TeamRolesList.jsx b/awx/ui_next/src/screens/Team/TeamRoles/TeamRolesList.jsx index d32814c061..fbe9c99063 100644 --- a/awx/ui_next/src/screens/Team/TeamRoles/TeamRolesList.jsx +++ b/awx/ui_next/src/screens/Team/TeamRoles/TeamRolesList.jsx @@ -39,7 +39,7 @@ function TeamRolesList({ me, team }) { request: fetchRoles, error: contentError, result: { - // roleCount, + roleCount, roles, isAdminOfOrg, relatedSearchableKeys, @@ -140,7 +140,7 @@ function TeamRolesList({ me, team }) { contentError={contentError} hasContentLoading={isLoading || isDisassociateLoading} items={roles} - itemCount={0} + itemCount={roleCount} pluralizedItemName={t`Team Roles`} qsConfig={QS_CONFIG} toolbarSearchColumns={[