Sha256: 0dce71e470c019688516440dfa3389ce75c6af2b8bf72c7c617db4e2258e8b3f
Contents?: true
Size: 1.14 KB
Versions: 90
Compression:
Stored size: 1.14 KB
Contents
import React from 'react'; import { Icon } from 'patternfly-react'; import PropTypes from 'prop-types'; import { translate as __ } from 'foremanReact/common/I18n'; const HostStatus = ({ status }) => { switch (status) { case 'cancelled': return ( <div> <Icon type="pf" name="warning-triangle-o" /> {status} </div> ); case 'N/A': return ( <div> <Icon type="fa" name="question" /> {status} </div> ); case 'running': return ( <div> <Icon type="pf" name="running" /> {status} </div> ); case 'planned': return ( <div> <Icon type="pf" name="build" /> {status} </div> ); case 'warning': case 'error': return ( <div> <Icon type="pf" name="error-circle-o" /> {__('failed')} </div> ); case 'success': return ( <div> <Icon type="pf" name="ok" /> {status} </div> ); default: return <span>{status}</span>; } }; HostStatus.propTypes = { status: PropTypes.string.isRequired, }; export default HostStatus;
Version data entries
90 entries across 90 versions & 1 rubygems