webpack/scenes/ContentViews/Details/Repositories/ContentCounts.js in katello-4.3.0.rc2.1 vs webpack/scenes/ContentViews/Details/Repositories/ContentCounts.js in katello-4.3.0.rc3

- old
+ new

@@ -1,9 +1,11 @@ import React, { Fragment } from 'react'; import PropTypes from 'prop-types'; import { urlBuilder } from 'foremanReact/common/urlHelpers'; +import { translate as __ } from 'foremanReact/common/I18n'; import ContentConfig from '../../../Content/ContentConfig'; +import InactiveText from '../../components/InactiveText'; // type: [plural_name, singular_name, link] const repoLabels = { rpm: ['RPM packages', 'RPM package', 'packages'], module_stream: ['module streams', 'module stream', 'module_streams'], @@ -49,9 +51,11 @@ info = ['unknown units', 'unknown unit', '']; } // package and rpm are the same if (type !== 'package' && count > 0) allCounts.push(appendCount(type, count, info, productId, repoId)); }); + + if (!allCounts.length) return <InactiveText text={__('No content')} />; return <Fragment>{allCounts}</Fragment>; }; ContentCounts.propTypes = {