mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Make PrometheusProviderRegistry fully injectable (#6592)
* Stop using source code in build file Signed-off-by: Sebastian Malton <sebastian@malton.name> * Add new injectable version of binaryName Signed-off-by: Sebastian Malton <sebastian@malton.name> * Add new NormalizedPlatform type Signed-off-by: Sebastian Malton <sebastian@malton.name> * Switch legacy execHelm to use legacy global DI for binaryPath Signed-off-by: Sebastian Malton <sebastian@malton.name> * Remove dead code Signed-off-by: Sebastian Malton <sebastian@malton.name> * Introduce injectable for kube auth proxy certs Signed-off-by: Sebastian Malton <sebastian@malton.name> * Introduce injectable forms of PrometheusProviders - Remove class requirement - Make everything injectable Signed-off-by: Sebastian Malton <sebastian@malton.name> * Update tests to not use private functions Signed-off-by: Sebastian Malton <sebastian@malton.name> * Cleanup creating binary names and paths Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
30bfd6fa88
commit
286e6c8de7
32 files changed
+589
-636
No files matched your search
@@ -1,36 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { PrometheusLens } from "../../prometheus/lens";
|
||||
import { PrometheusHelm } from "../../prometheus/helm";
|
||||
import { PrometheusHelm14 } from "../../prometheus/helm-14";
|
||||
import { PrometheusOperator } from "../../prometheus/operator";
|
||||
import { PrometheusStacklight } from "../../prometheus/stacklight";
|
||||
import prometheusProviderRegistryInjectable from "../../prometheus/prometheus-provider-registry.injectable";
|
||||
import { onLoadOfApplicationInjectionToken } from "../runnable-tokens/on-load-of-application-injection-token";
|
||||
|
||||
const setupPrometheusRegistryInjectable = getInjectable({
|
||||
id: "setup-prometheus-registry",
|
||||
|
||||
instantiate: (di) => {
|
||||
const prometheusProviderRegistry = di.inject(prometheusProviderRegistryInjectable);
|
||||
|
||||
return {
|
||||
id: "setup-prometheus-registry",
|
||||
run: () => {
|
||||
prometheusProviderRegistry
|
||||
.registerProvider(new PrometheusLens())
|
||||
.registerProvider(new PrometheusHelm14())
|
||||
.registerProvider(new PrometheusHelm())
|
||||
.registerProvider(new PrometheusOperator())
|
||||
.registerProvider(new PrometheusStacklight());
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
injectionToken: onLoadOfApplicationInjectionToken,
|
||||
});
|
||||
|
||||
export default setupPrometheusRegistryInjectable;
|
||||
Reference in new issue
Block a user