Skip to content

Commit c374d5e

Browse files
authored
Merge pull request #1681 from headlamp-k8s/fixParseKubeconfig
frontend: fix calling /parseKubeConfig
2 parents d0aea57 + 13383f3 commit c374d5e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

frontend/src/components/App/Layout.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,18 @@ export default function Layout({}: LayoutProps) {
145145
dispatch(setConfig(configToStore));
146146
}
147147
}
148+
149+
/**
150+
* Fetches the stateless cluster config from the indexDB and then sends the backend to parse it
151+
* only if the stateless cluster config is enabled in the backend.
152+
*/
153+
if (config?.isDynamicClusterEnabled) {
154+
fetchStatelessClusterKubeConfigs(dispatch);
155+
}
148156
})
149157
.catch(err => {
150158
console.error('Error getting config:', err);
151159
});
152-
153-
fetchStatelessClusterKubeConfigs(dispatch);
154160
};
155161

156162
return (

0 commit comments

Comments
 (0)