Skip to content

Commit

Permalink
Remove duplicate install bundle on InstanceDetail
Browse files Browse the repository at this point in the history
  • Loading branch information
fosterseth committed Aug 1, 2023
1 parent 493b003 commit 12a9fe4
Showing 1 changed file with 26 additions and 43 deletions.
69 changes: 26 additions & 43 deletions awx/ui/src/screens/Instances/InstanceDetail/InstanceDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,29 +209,32 @@ function InstanceDetail({ setBreadcrumb, isK8s }) {
<Detail label={t`Host`} value={instance.ip_address} />
<Detail label={t`Instance Port`} value={instance.listener_port} />
{(isExecutionNode || isHopNode) && (
<Detail
label={t`Peers from control nodes`}
value={instance.peers_from_control_nodes ? t`On` : t`Off`}
/>
)}
{instance.related?.install_bundle && (
<Detail
label={t`Install Bundle`}
value={
<Tooltip content={t`Click to download bundle`}>
<Button
component="a"
isSmall
href={`${instance.related?.install_bundle}`}
target="_blank"
variant="secondary"
dataCy="install-bundle-download-button"
>
<DownloadIcon />
</Button>
</Tooltip>
}
/>
<>
{instance.related?.install_bundle && (
<Detail
label={t`Install Bundle`}
value={
<Tooltip content={t`Click to download bundle`}>
<Button
component="a"
isSmall
href={`${instance.related?.install_bundle}`}
target="_blank"
variant="secondary"
dataCy="install-bundle-download-button"
rel="noopener noreferrer"
>
<DownloadIcon />
</Button>
</Tooltip>
}
/>
)}
<Detail
label={t`Peers from control nodes`}
value={instance.peers_from_control_nodes ? t`On` : t`Off`}
/>
</>
)}
{!isHopNode && (
<>
Expand Down Expand Up @@ -273,26 +276,6 @@ function InstanceDetail({ setBreadcrumb, isK8s }) {
}
value={formatHealthCheckTimeStamp(instance.last_health_check)}
/>
{instance.related?.install_bundle && (
<Detail
label={t`Install Bundle`}
value={
<Tooltip content={t`Click to download bundle`}>
<Button
component="a"
isSmall
href={`${instance.related?.install_bundle}`}
target="_blank"
variant="secondary"
dataCy="install-bundle-download-button"
rel="noopener noreferrer"
>
<DownloadIcon />
</Button>
</Tooltip>
}
/>
)}
<Detail
label={t`Capacity Adjustment`}
dataCy="capacity-adjustment"
Expand Down

0 comments on commit 12a9fe4

Please sign in to comment.