Sha256: c9af2e8ba1fb0276e109e6a8f535835d3998ca5dac668ce1d8720dbd32bbf670

Contents?: true

Size: 1.01 KB

Versions: 59

Compression:

Stored size: 1.01 KB

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

59 entries across 59 versions & 1 rubygems

Version Path
foreman_rh_cloud-4.0.35 webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js
foreman_rh_cloud-5.0.37 webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js
foreman_rh_cloud-5.0.36 webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js
foreman_rh_cloud-5.0.35 webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js
foreman_rh_cloud-5.0.34 webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js
foreman_rh_cloud-5.0.33 webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js
foreman_rh_cloud-4.0.32 webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js
foreman_rh_cloud-5.0.32 webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js
foreman_rh_cloud-4.0.31 webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js
foreman_rh_cloud-5.0.31 webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js
foreman_rh_cloud-5.0.30 webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js
foreman_rh_cloud-4.0.30 webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js
foreman_rh_cloud-4.0.29 webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js
foreman_rh_cloud-5.0.29 webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js
foreman_rh_cloud-5.0.28 webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js
foreman_rh_cloud-4.0.27 webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js
foreman_rh_cloud-4.0.26 webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js
foreman_rh_cloud-4.0.25.1 webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js
foreman_rh_cloud-4.0.25 webpack/ForemanInventoryUpload/Components/PageHeader/components/SyncButton/components/Toast.js