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-1.0.12 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-2.0.12 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-0.9.11 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-1.0.11 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-2.0.11 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-0.9.10 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-1.0.10 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-2.0.10 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-2.0.9 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-1.0.9 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-0.9.9 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-0.9.8 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-1.0.8 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-2.0.8 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-0.9.7 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-1.0.7 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-2.0.7 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-0.9.6 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-1.0.6 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-2.0.6 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js