Sha256: 76ebfe134739c6b3e28d1e5dd993fe2e00136479c77219a1094514fa85028510

Contents?: true

Size: 1.54 KB

Versions: 45

Compression:

Stored size: 1.54 KB

Contents

import React from 'react';
import PropTypes from 'prop-types';

const AggregateStatus = ({ statuses, chartFilter }) => (
  <div id="aggregate_statuses">
    <p className="card-pf-aggregate-status-notifications">
      <a
        className="card-pf-aggregate-status-notification"
        onClick={() => chartFilter('success')}
      >
        <span id="success_count">
          <span className="pficon pficon-ok" />
          {statuses.success}
        </span>
      </a>

      <a
        className="card-pf-aggregate-status-notification"
        onClick={() => chartFilter('failed')}
      >
        <span id="failed_count">
          <span className="pficon pficon-error-circle-o" />
          {statuses.failed}
        </span>
      </a>

      <a
        className="card-pf-aggregate-status-notification"
        onClick={() => chartFilter('pending')}
      >
        <span id="pending_count">
          <span className="pficon pficon-running" />
          {statuses.pending}
        </span>
      </a>

      <a
        className="card-pf-aggregate-status-notification"
        onClick={() => chartFilter('cancelled')}
      >
        <span id="cancelled_count">
          <span className="pficon pficon-close" />
          {statuses.cancelled}
        </span>
      </a>
    </p>
  </div>
);

AggregateStatus.propTypes = {
  statuses: PropTypes.shape({
    cancelled: PropTypes.number,
    failed: PropTypes.number,
    pending: PropTypes.number,
    success: PropTypes.number,
  }).isRequired,
  chartFilter: PropTypes.func.isRequired,
};

export default AggregateStatus;

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
foreman_remote_execution-9.1.0 webpack/react_app/components/jobInvocations/AggregateStatus/index.js
foreman_remote_execution-8.2.1 webpack/react_app/components/jobInvocations/AggregateStatus/index.js
foreman_remote_execution-8.2.0 webpack/react_app/components/jobInvocations/AggregateStatus/index.js
foreman_remote_execution-9.0.1 webpack/react_app/components/jobInvocations/AggregateStatus/index.js
foreman_remote_execution-9.0.0 webpack/react_app/components/jobInvocations/AggregateStatus/index.js