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

Version Path
foreman_remote_execution-14.0.2 webpack/react_app/components/TargetingHosts/components/HostStatus.js
foreman_remote_execution-14.0.1 webpack/react_app/components/TargetingHosts/components/HostStatus.js
foreman_remote_execution-13.2.6 webpack/react_app/components/TargetingHosts/components/HostStatus.js
foreman_remote_execution-14.0.0 webpack/react_app/components/TargetingHosts/components/HostStatus.js
foreman_remote_execution-13.2.5 webpack/react_app/components/TargetingHosts/components/HostStatus.js
foreman_remote_execution-13.2.4 webpack/react_app/components/TargetingHosts/components/HostStatus.js
foreman_remote_execution-13.2.3 webpack/react_app/components/TargetingHosts/components/HostStatus.js
foreman_remote_execution-13.2.2 webpack/react_app/components/TargetingHosts/components/HostStatus.js
foreman_remote_execution-12.0.7 webpack/react_app/components/TargetingHosts/components/HostStatus.js
foreman_remote_execution-13.2.1 webpack/react_app/components/TargetingHosts/components/HostStatus.js
foreman_remote_execution-13.2.0 webpack/react_app/components/TargetingHosts/components/HostStatus.js
foreman_remote_execution-10.1.3 webpack/react_app/components/TargetingHosts/components/HostStatus.js
foreman_remote_execution-13.0.0 webpack/react_app/components/TargetingHosts/components/HostStatus.js
foreman_remote_execution-12.0.5 webpack/react_app/components/TargetingHosts/components/HostStatus.js
foreman_remote_execution-12.0.4 webpack/react_app/components/TargetingHosts/components/HostStatus.js
foreman_remote_execution-12.0.1 webpack/react_app/components/TargetingHosts/components/HostStatus.js
foreman_remote_execution-12.0.2 webpack/react_app/components/TargetingHosts/components/HostStatus.js
foreman_remote_execution-11.1.3 webpack/react_app/components/TargetingHosts/components/HostStatus.js
foreman_remote_execution-10.1.2 webpack/react_app/components/TargetingHosts/components/HostStatus.js
foreman_remote_execution-12.0.0 webpack/react_app/components/TargetingHosts/components/HostStatus.js