webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js in katello-4.12.0 vs webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js in katello-4.12.1
- old
+ new
@@ -3,11 +3,10 @@
import { useDispatch, useSelector } from 'react-redux';
import {
Bullseye, Split, SplitItem, Button, ActionList,
ActionListItem, Dropdown, DropdownItem, KebabToggle,
} from '@patternfly/react-core';
-import { Link } from 'react-router-dom';
import { TableVariant, fitContent, TableText } from '@patternfly/react-table';
import { PencilAltIcon } from '@patternfly/react-icons';
import { STATUS } from 'foremanReact/constants';
import { translate as __ } from 'foremanReact/common/I18n';
import { urlBuilder } from 'foremanReact/common/urlHelpers';
@@ -134,11 +133,11 @@
results.forEach((componentCV) => {
const {
id: componentCvId, content_view: cv, content_view_version: cvVersion,
latest, component_content_view_versions: componentCvVersions,
} = componentCV;
- const { environments, repositories } = cvVersion || {};
+ const { environments, repositories, id: cvVersionId } = cvVersion || {};
const {
id,
name,
description,
} = cv;
@@ -169,10 +168,14 @@
</Button>
</SplitItem>}
</Split>),
},
{ title: environments ? <ComponentEnvironments {...{ environments }} /> : <InactiveText text={__('Not yet published')} /> },
- { title: <Link to={urlBuilder(`content_views/${id}#repositories`, '')}>{repositories ? repositories.length : 0}</Link> },
+ {
+ title: cvVersionId ?
+ <a href={urlBuilder(`content_views/${id}#/versions/${cvVersionId}/repositories`, '')}>{repositories ? repositories.length : 0}</a> :
+ 0,
+ },
{
title: <AddedStatusLabel added={!!componentCvId} />,
},
{
title: description ?