Sha256: b1716afa63cf64f4dd87b1a049c1f4c595c5632a2e63e9f1fbea4a6df91eeda2
Contents?: true
Size: 808 Bytes
Versions: 39
Compression:
Stored size: 808 Bytes
Contents
import React from 'react'; import { Link } from 'react-router-dom'; import { translate as __ } from 'foremanReact/common/I18n'; import { urlBuilder } from 'foremanReact/common/urlHelpers'; export const subscriptionTypeFormatter = (value, { rowData }) => { let cellContent; if (rowData.virt_only === false) { cellContent = __('Physical'); } else if (rowData.hypervisor) { cellContent = ( <span> {__('Guests of')} {' '} <Link to={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
39 entries across 39 versions & 1 rubygems