Skip to content

Commit d47ab5f

Browse files
authored
Assisted Installer OVE UI shows transient blank page with Technology Preview spinner (#3341)
Signed-off-by: Elay Aharoni <elayaha@gmail.com>
1 parent cd01017 commit d47ab5f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

libs/ui-lib/lib/ocm/hooks/useInfraEnvId.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ export default function useInfraEnvId(
5555
]);
5656

5757
React.useEffect(() => {
58-
if (!clusterId) {
58+
if (!clusterId && !isSingleClusterFeatureEnabled) {
5959
setError('Missing clusterId to load infrastructure environment');
6060
} else if (!infraEnvId) {
6161
void findInfraEnvId();
6262
}
63-
}, [clusterId, findInfraEnvId, infraEnvId]);
63+
}, [clusterId, findInfraEnvId, infraEnvId, isSingleClusterFeatureEnabled]);
6464

6565
return { infraEnvId, error };
6666
}

libs/ui-lib/lib/ocm/services/InfraEnvsService.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ const InfraEnvsService = {
2121
const { data: infraEnvs } = await InfraEnvsAPI.list(
2222
!isSingleClusterFeatureEnabled ? clusterId : '',
2323
);
24-
if (infraEnvs.length > 0) {
24+
if (isSingleClusterFeatureEnabled) {
25+
return infraEnvs[0].id;
26+
}
27+
if (infraEnvs.length > 0 && clusterId) {
2528
InfraEnvCache.updateInfraEnvs(clusterId, infraEnvs);
2629
infraEnvId = InfraEnvCache.getInfraEnvId(clusterId, cpuArchitecture);
2730
}

0 commit comments

Comments
 (0)