import React from 'react'; import PropTypes from 'prop-types'; import { translate as __ } from 'foremanReact/common/I18n'; import { TableComposable, Thead, Tbody, Tr, Th, Td, } from '@patternfly/react-table'; import { Flex, FlexItem } from '@patternfly/react-core'; import Pagination from 'foremanReact/components/Pagination'; import withLoading from '../../../../withLoading'; const AllRolesTable = ({ allAnsibleRoles, totalCount }) => { const columns = [__('Name'), __('Source')]; return ( {columns.map(col => ( {col} ))} {allAnsibleRoles.map(role => ( {role.name} {role.inherited ? __('Inherited from Hostgroup') : __('Directly assigned to Host')} ))} ); }; AllRolesTable.propTypes = { allAnsibleRoles: PropTypes.array.isRequired, totalCount: PropTypes.number.isRequired, }; export default withLoading(AllRolesTable);