Remove duplicate install bundle on InstanceDetail

This commit is contained in:
Seth Foster
2023-08-01 16:37:35 -04:00
committed by Seth Foster
parent eb0058268b
commit ad96a72ebe

View File

@@ -209,29 +209,32 @@ function InstanceDetail({ setBreadcrumb, isK8s }) {
<Detail label={t`Host`} value={instance.ip_address} /> <Detail label={t`Host`} value={instance.ip_address} />
<Detail label={t`Instance Port`} value={instance.listener_port} /> <Detail label={t`Instance Port`} value={instance.listener_port} />
{(isExecutionNode || isHopNode) && ( {(isExecutionNode || isHopNode) && (
<Detail <>
label={t`Peers from control nodes`} {instance.related?.install_bundle && (
value={instance.peers_from_control_nodes ? t`On` : t`Off`} <Detail
/> label={t`Install Bundle`}
)} value={
{instance.related?.install_bundle && ( <Tooltip content={t`Click to download bundle`}>
<Detail <Button
label={t`Install Bundle`} component="a"
value={ isSmall
<Tooltip content={t`Click to download bundle`}> href={`${instance.related?.install_bundle}`}
<Button target="_blank"
component="a" variant="secondary"
isSmall dataCy="install-bundle-download-button"
href={`${instance.related?.install_bundle}`} rel="noopener noreferrer"
target="_blank" >
variant="secondary" <DownloadIcon />
dataCy="install-bundle-download-button" </Button>
> </Tooltip>
<DownloadIcon /> }
</Button> />
</Tooltip> )}
} <Detail
/> label={t`Peers from control nodes`}
value={instance.peers_from_control_nodes ? t`On` : t`Off`}
/>
</>
)} )}
{!isHopNode && ( {!isHopNode && (
<> <>
@@ -273,26 +276,6 @@ function InstanceDetail({ setBreadcrumb, isK8s }) {
} }
value={formatHealthCheckTimeStamp(instance.last_health_check)} 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 <Detail
label={t`Capacity Adjustment`} label={t`Capacity Adjustment`}
dataCy="capacity-adjustment" dataCy="capacity-adjustment"