Sha256: c8a9c29bf481c05324920d0c60da82ba2f76ef22db048c28db1aa52e6febe2cb

Contents?: true

Size: 1.09 KB

Versions: 84

Compression:

Stored size: 1.09 KB

Contents

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

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

84 entries across 84 versions & 1 rubygems

Version Path
foreman_rh_cloud-5.0.39 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-5.0.38 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-4.0.35 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-5.0.37 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-5.0.36 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-5.0.35 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-5.0.34 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-5.0.33 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-3.0.32 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-4.0.32 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-5.0.32 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-4.0.31 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-5.0.31 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-5.0.30 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-4.0.30 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-3.0.29 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-4.0.29 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-5.0.29 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-3.0.28 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-5.0.28 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js