Remove multiple usages of shared global state

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne SavolainenandMikko Aspiala committed 2022-05-11 08:20:38 +03:00
1 parent 8204dc5a9a
commit 4eb4edaed9
48 files changed
+529 -257

No files matched your search

@@ -14,11 +14,15 @@ const createClusterInjectable = getInjectable({
instantiate: (di) => {
const dependencies: ClusterDependencies = {
directoryForKubeConfigs: di.inject(directoryForKubeConfigsInjectable),
// TODO: Dismantle wrong abstraction
createKubeconfigManager: () => { throw new Error("Tried to access back-end feature in front-end."); },
createKubectl: () => { throw new Error("Tried to access back-end feature in front-end.");},
createContextHandler: () => { throw new Error("Tried to access back-end feature in front-end."); },
createAuthorizationReview: () => { throw new Error("Tried to access back-end feature in front-end."); },
createListNamespaces: () => { throw new Error("Tried to access back-end feature in front-end."); },
detectorRegistry: null,
createVersionDetector: () => { throw new Error("Tried to access back-end feature in front-end."); },
};
return (model) => new Cluster(dependencies, model);