Sha256: c8a9c29bf481c05324920d0c60da82ba2f76ef22db048c28db1aa52e6febe2cb
Contents?: true
Size: 1.09 KB
Versions: 84
Compression:
Stored size: 1.09 KB
Contents
import React from 'react'; import { Grid, GridItem } from '@patternfly/react-core'; import PropTypes from 'prop-types'; import { translate as __ } from 'foremanReact/common/I18n'; import { getStatusIconByRegex } from './ListItemStatusHelper'; const ListItemStatus = ({ account }) => { const generatingStatusIcon = getStatusIconByRegex( account.generate_report_status ); const uploadingStatusIcon = getStatusIconByRegex( account.upload_report_status ); return ( <Grid hasGutter className="status"> <GridItem span={6} className="item"> <p>{__('Generating')}</p> {generatingStatusIcon} </GridItem> <GridItem span={6} className="item"> <p>{__('Uploading')}</p> {uploadingStatusIcon} </GridItem> </Grid> ); }; ListItemStatus.propTypes = { account: PropTypes.shape({ generate_report_status: PropTypes.string, upload_report_status: PropTypes.string, }), }; ListItemStatus.defaultProps = { account: { generate_report_status: 'unknown', uploupload_report_statusading: 'unknown', }, }; export default ListItemStatus;
Version data entries
84 entries across 84 versions & 1 rubygems