Sha256: 1436691ef7842eedc0ae6e327cb20ac1de374a99565e7b7f9707ef2da3c4d067
Contents?: true
Size: 1.46 KB
Versions: 69
Compression:
Stored size: 1.46 KB
Contents
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { translate as __ } from 'foremanReact/common/I18n'; import { LoadingState } from 'patternfly-react'; class SystemStatuses extends Component { componentDidMount() { this.props.getSystemStatuses('/katello/api/ping'); } render() { const { services, status } = this.props; const isLoading = status === 'PENDING'; return ( <div className="col-md-7"> <div className="stats-well"> <h4>{__('Backend System Status')}</h4> <LoadingState loading={isLoading} loadingText=""> <table className="table table-striped"> <tbody> <tr> <th>{__('Component')}</th> <th>{__('Status')}</th> <th>{__('Message')}</th> </tr> {Object.entries(services).map(([key, value]) => ( <tr key={key}> <td> {key} </td> <td>{value.status.toUpperCase()}</td> <td> {value.message}</td> </tr> ))} </tbody> </table> </LoadingState> </div> </div> ); } } SystemStatuses.propTypes = { getSystemStatuses: PropTypes.func.isRequired, services: PropTypes.shape({}), status: PropTypes.string, }; SystemStatuses.defaultProps = { services: {}, status: '', }; export default SystemStatuses;
Version data entries
69 entries across 69 versions & 1 rubygems