Sha256: c8a9c29bf481c05324920d0c60da82ba2f76ef22db048c28db1aa52e6febe2cb

Contents?: true

Size: 1.09 KB

Versions: 86

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

86 entries across 86 versions & 1 rubygems

Version Path
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
foreman_rh_cloud-4.0.27 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-3.0.26 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-4.0.26 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-4.0.25.1 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-3.0.25 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-4.0.25 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-3.0.24.1 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-4.0.24.1 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-3.0.24 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-4.0.24 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-3.0.23 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-4.0.23 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-3.0.22 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-4.0.22 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-4.0.21.1 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-3.0.21.1 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-3.0.21 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js
foreman_rh_cloud-3.0.20 webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/ListItemStatus.js