Sha256: 07ea3cc2270589b73caa3401f835f6bb1f057b8303306d09e446874962558253

Contents?: true

Size: 1.09 KB

Versions: 58

Compression:

Stored size: 1.09 KB

Contents

import React from 'react';
import { Grid } from 'patternfly-react';
import PropTypes from 'prop-types';
import { translate as __ } from 'foremanReact/common/I18n';
import './listItemStatus.scss';
import { getStatusIconByRegex } from './ListItemStatusHelper';

const ListItemStatus = ({ account }) => {
  const generatingStatusIcon = getStatusIconByRegex(
    account.generate_report_status
  );
  const uploadingStatusIcon = getStatusIconByRegex(
    account.upload_report_status
  );
  return (
    <Grid className="status">
      <Grid.Col sm={6} className="item">
        <p>{__('Generating')}</p>
        {generatingStatusIcon}
      </Grid.Col>
      <Grid.Col sm={6} className="item">
        <p>{__('Uploading')}</p>
        {uploadingStatusIcon}
      </Grid.Col>
    </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

58 entries across 58 versions & 2 rubygems

Version Path
foreman_rh_cloud-2.0.18.1 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-1.0.18 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-2.0.18 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-1.0.17 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-2.0.17 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-2.0.16 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-1.0.16 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-1.0.15 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-2.0.15 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-3.0.14 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-2.0.14 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-1.0.14 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-0.9.14 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-0.9.13.1 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-1.0.13.1 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-2.0.13.1 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-0.9.13 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-1.0.13 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-2.0.13 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-0.9.12 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js