Sha256: 8284cee452914b853ef2bf39a8724efb1cf052a26d909051046e21ece2ed2d5a
Contents?: true
Size: 806 Bytes
Versions: 121
Compression:
Stored size: 806 Bytes
Contents
import React from 'react'; 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) { const hypervisorLink = urlBuilder('content_hosts', '', rowData.hypervisor.id); cellContent = ( <span> {__('Guests of')} {' '} <a href={hypervisorLink}>{rowData.hypervisor.name}</a> </span> ); } else if (rowData.unmapped_guest) { cellContent = __('Temporary'); } else { cellContent = __('Virtual'); } return ( <td> {cellContent} </td> ); }; export default subscriptionTypeFormatter;
Version data entries
121 entries across 121 versions & 1 rubygems