mirror of
https://github.com/ansible/awx.git
synced 2026-01-20 14:11:24 -03: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:
parent
53fe08af61
commit
ab40006535
@ -84,6 +84,12 @@ function OrganizationDetail({ organization }) {
|
||||
return <ContentError error={contentError} />;
|
||||
}
|
||||
|
||||
const buildLinkURL = instance => {
|
||||
return instance.is_container_group
|
||||
? '/instance_groups/container_group/'
|
||||
: '/instance_groups/';
|
||||
};
|
||||
|
||||
return (
|
||||
<CardBody>
|
||||
<DetailList>
|
||||
@ -118,9 +124,11 @@ function OrganizationDetail({ organization }) {
|
||||
value={
|
||||
<ChipGroup numChips={5} totalChips={instanceGroups.length}>
|
||||
{instanceGroups.map(ig => (
|
||||
<Chip key={ig.id} isReadOnly>
|
||||
{ig.name}
|
||||
</Chip>
|
||||
<Link to={`${buildLinkURL(ig)}${ig.id}/details`}>
|
||||
<Chip key={ig.id} isReadOnly>
|
||||
{ig.name}
|
||||
</Chip>
|
||||
</Link>
|
||||
))}
|
||||
</ChipGroup>
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user