Improve the injectability of cluster metadata detection (#6910)

* Improve the injectability of cluster metadata detection

- Remove unnecessary and complex base class

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Remove dead code

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Remove dead code

Signed-off-by: Sebastian Malton <sebastian@malton.name>

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2023-01-19 16:34:31 +02:00
1 parent d059956c1e
commit 8e65a0acd6
22 files changed
+443 -492

No files matched your search

@@ -29,9 +29,12 @@ const createClusterInjectable = getInjectable({
createAuthorizationReview: () => { throw new Error("Tried to access back-end feature in front-end."); },
requestNamespaceListPermissionsFor: () => { 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."); },
requestApiResources: ()=> { throw new Error("Tried to access back-end feature in front-end."); },
detectorRegistry: undefined as never,
createVersionDetector: () => { throw new Error("Tried to access back-end feature in front-end."); },
requestApiResources: () => { throw new Error("Tried to access back-end feature in front-end."); },
detectClusterMetadata: () => { throw new Error("Tried to access back-end feature in front-end."); },
clusterVersionDetector: {
detect: () => { throw new Error("Tried to access back-end feature in front-end."); },
key: "irrelavent",
},
};
return (model, configData) => new Cluster(dependencies, model, configData);