Sha256: df695621f2c1b1cbe14f77879d3fba90598cf036ebfa2fb6b236a174745e3f83
Contents?: true
Size: 1.49 KB
Versions: 20
Compression:
Stored size: 1.49 KB
Contents
import React from 'react'; import { ListView } from 'patternfly-react'; import PropTypes from 'prop-types'; import { translate as __ } from 'foremanReact/common/I18n'; import InfoItem from './InfoItem'; import SortableHeaderItem from './SortableHeaderItem'; const PreupgradeReportsListHeader = ({ sort, changeSort, toggleSelectAll }) => { const additionalInfoColumns = [ { label: __('Host'), value: 'hostname' }, { label: __('Risk Factor'), value: 'severity' }, { label: __('Has Remediation?'), value: 'fix' }, { label: __('Inhibitor?'), value: 'inhibitor' }, ]; const additionalInfo = additionalInfoColumns.map((col, idx) => ( <InfoItem itemId={idx.toString()} key={idx}> <strong> <SortableHeaderItem title={col.label} sort={sort} value={col.value} changeSort={changeSort} /> </strong> </InfoItem> )); return ( <ListView.Item additionalInfo={additionalInfo} className="list-view-header" checkboxInput={<input type="checkbox" onClick={toggleSelectAll} />} description={ <SortableHeaderItem title={__('Title')} sort={sort} value="title" changeSort={changeSort} /> } hideCloseIcon stacked /> ); }; PreupgradeReportsListHeader.propTypes = { sort: PropTypes.object.isRequired, changeSort: PropTypes.func.isRequired, toggleSelectAll: PropTypes.func.isRequired, }; export default PreupgradeReportsListHeader;
Version data entries
20 entries across 20 versions & 1 rubygems