Sha256: 04b0ccdf9dbff898f86a9595d386b2a3f74eddb4a10271065eeed99dbcb9742b
Contents?: true
Size: 1.77 KB
Versions: 23
Compression:
Stored size: 1.77 KB
Contents
import React from 'react'; import PropTypes from 'prop-types'; import { Grid } from 'patternfly-react'; import SearchBar from 'foremanReact/components/SearchBar'; import Pagination from 'foremanReact/components/Pagination/PaginationWrapper'; import { getControllerSearchProps } from 'foremanReact/constants'; import TargetingHosts from './TargetingHosts'; import './TargetingHostsPage.scss'; const TargetingHostsPage = ({ handleSearch, searchQuery, apiStatus, items, totalHosts, pagination, handlePagination, }) => ( <div id="targeting_hosts"> <Grid.Row> <Grid.Col md={6} className="title_filter"> <SearchBar onSearch={query => handleSearch(query)} data={{ ...getControllerSearchProps('hosts'), autocomplete: { id: 'targeting_hosts_search', searchQuery, url: '/hosts/auto_complete_search', useKeyShortcuts: true, }, bookmarks: {}, }} /> </Grid.Col> </Grid.Row> <br /> <TargetingHosts apiStatus={apiStatus} items={items} /> <Pagination viewType="table" itemCount={totalHosts} pagination={pagination} onChange={args => handlePagination(args)} dropdownButtonId="targeting-hosts-pagination-dropdown" className="targeting-hosts-pagination" /> </div> ); TargetingHostsPage.propTypes = { handleSearch: PropTypes.func.isRequired, searchQuery: PropTypes.string.isRequired, apiStatus: PropTypes.string, items: PropTypes.array.isRequired, totalHosts: PropTypes.number.isRequired, pagination: PropTypes.object.isRequired, handlePagination: PropTypes.func.isRequired, }; TargetingHostsPage.defaultProps = { apiStatus: null, }; export default TargetingHostsPage;
Version data entries
23 entries across 23 versions & 1 rubygems