Skip to content

Commit 32d7d0d

Browse files
committed
fix: Have the connect buttons be disabled if pods not yet managed
1 parent 812ea56 commit 32d7d0d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/online-shell/src/discover/DiscoverPodConnect.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ export const DiscoverPodConnect: React.FunctionComponent<DiscoverPodConnectProps
3838
}
3939

4040
const disableContainerButton = (): boolean => {
41-
return mgmtService.podStatus(props.pod.mPod) !== 'Running' || connectionNames.length === 0 || mgmtError !== null
41+
return mgmtService.podStatus(props.pod.mPod) !== 'Running' ||
42+
(! props.pod.mPod.getManagement().status.managed) ||
43+
connectionNames.length === 0 || mgmtError !== null
4244
}
4345

4446
const onConnect = (connectName: string) => {
@@ -83,6 +85,7 @@ export const DiscoverPodConnect: React.FunctionComponent<DiscoverPodConnectProps
8385
<DropdownItem
8486
key={`${props.pod.uid}-container-${index}`}
8587
component='button'
88+
isDisabled={disableContainerButton()}
8689
onClick={() => onConnect(connectionName)}
8790
>
8891
{connectionName.replace(`${props.pod.name}-`, '')}

0 commit comments

Comments
 (0)