Sha256: c56ef16b8641589872aaf6ee5689113777a8c1305cb211cd181d85aad2dd43e6

Contents?: true

Size: 761 Bytes

Versions: 21

Compression:

Stored size: 761 Bytes

Contents

import React from 'react';
import { Link } from 'react-router-dom';
import helpers from '../../../../move_to_foreman/common/helpers';

export const subscriptionTypeFormatter = (value, { rowData }) => {
  let cellContent;

  if (rowData.virt_only === false) {
    cellContent = __('Physical');
  } else if (rowData.hypervisor) {
    cellContent = (
      <span>
        {__('Guests of')}
        {' '}
        <Link to={helpers.urlBuilder('content_hosts', '', rowData.hypervisor.id)}>{rowData.hypervisor.name}</Link>
      </span>
    );
  } else if (rowData.unmapped_guest) {
    cellContent = __('Temporary');
  } else {
    cellContent = __('Virtual');
  }

  return (
    <td>
      {cellContent}
    </td>
  );
};

export default subscriptionTypeFormatter;

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
katello-3.12.3 webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js
katello-3.12.2 webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js
katello-3.12.1 webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js
katello-3.11.2 webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js
katello-3.10.2 webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js
katello-3.12.0 webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js
katello-3.12.0.rc2 webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js
katello-3.10.1.1 webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js
katello-3.12.0.rc1 webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js
katello-3.10.1 webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js
katello-3.11.1 webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js
katello-3.11.0 webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js
katello-3.11.0.rc2 webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js
katello-3.11.0.rc1 webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js
katello-3.10.0 webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js
katello-3.10.0.rc1.1 webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js
katello-3.9.1 webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js
katello-3.10.0.rc1 webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js
katello-3.9.0 webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js
katello-3.9.0.rc2 webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js