Sha256: daf3ee1719fb2d2f5d6760332fefc8019fc091e9e37834043a5a9d1020c20f5a

Contents?: true

Size: 1016 Bytes

Versions: 49

Compression:

Stored size: 1016 Bytes

Contents

import React from 'react';
import PropTypes from 'prop-types';
import { translate as __ } from 'foremanReact/common/I18n';
import { foremanUrl } from '../../../../../../ForemanRhCloudHelpers';

const Toast = ({ syncHosts, disconnectHosts }) => {
  const totalHosts = syncHosts + disconnectHosts;
  return (
    <span>
      <p>
        {__('Hosts with subscription in organization: ')}
        <strong>{totalHosts}</strong>
      </p>
      <p>
        {__('Successfully synced hosts: ')}
        <strong>{syncHosts}</strong>
      </p>
      <p>
        {__('Disconnected hosts: ')}
        <strong>{disconnectHosts}</strong>
      </p>
      <p>
        For more info, please visit the{' '}
        <a
          href={foremanUrl('/hosts')}
          target="_blank"
          rel="noopener noreferrer"
        >
          hosts page
        </a>
      </p>
    </span>
  );
};

Toast.propTypes = {
  syncHosts: PropTypes.number.isRequired,
  disconnectHosts: PropTypes.number.isRequired,
};

export default Toast;

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
foreman_rh_cloud-0.9.13 webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js
foreman_rh_cloud-1.0.13 webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js
foreman_rh_cloud-2.0.13 webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js
foreman_rh_cloud-0.9.12 webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js
foreman_rh_cloud-1.0.12 webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js
foreman_rh_cloud-2.0.12 webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js
foreman_rh_cloud-0.9.11 webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js
foreman_rh_cloud-1.0.11 webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js
foreman_rh_cloud-2.0.11 webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js