mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02:30
Link to instance group from org details when present
Link to instance group from org details when present See: https://github.com/ansible/awx/issues/4953
This commit is contained in:
@@ -84,6 +84,12 @@ function OrganizationDetail({ organization }) {
|
|||||||
return <ContentError error={contentError} />;
|
return <ContentError error={contentError} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const buildLinkURL = instance => {
|
||||||
|
return instance.is_container_group
|
||||||
|
? '/instance_groups/container_group/'
|
||||||
|
: '/instance_groups/';
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CardBody>
|
<CardBody>
|
||||||
<DetailList>
|
<DetailList>
|
||||||
@@ -118,9 +124,11 @@ function OrganizationDetail({ organization }) {
|
|||||||
value={
|
value={
|
||||||
<ChipGroup numChips={5} totalChips={instanceGroups.length}>
|
<ChipGroup numChips={5} totalChips={instanceGroups.length}>
|
||||||
{instanceGroups.map(ig => (
|
{instanceGroups.map(ig => (
|
||||||
<Chip key={ig.id} isReadOnly>
|
<Link to={`${buildLinkURL(ig)}${ig.id}/details`}>
|
||||||
{ig.name}
|
<Chip key={ig.id} isReadOnly>
|
||||||
</Chip>
|
{ig.name}
|
||||||
|
</Chip>
|
||||||
|
</Link>
|
||||||
))}
|
))}
|
||||||
</ChipGroup>
|
</ChipGroup>
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user