mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Extract pod metrics and cluster frame context
Signed-off-by: Sami Tiilikainen <97873007+samitiilikainen@users.noreply.github.com>
This commit is contained in:
1 parent
323b3759fc
commit
3c16777784
24 files changed
+133
-19
No files matched your search
+10
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectionToken } from "@ogre-tools/injectable";
|
||||
import type { PodMetricsApi } from "@k8slens/kube-api";
|
||||
|
||||
export const podMetricsApiInjectionToken = getInjectionToken<PodMetricsApi>({
|
||||
id: "pod-metrics-api-injection-token",
|
||||
});
|
||||
+2
-2
@@ -6,9 +6,9 @@ import { getInjectable } from "@ogre-tools/injectable";
|
||||
import assert from "assert";
|
||||
import { storesAndApisCanBeCreatedInjectionToken } from "./can-be-created-token";
|
||||
import { PodMetricsApi } from "@k8slens/kube-api";
|
||||
import { kubeApiInjectionToken } from "./token";
|
||||
import { logErrorInjectionToken, logInfoInjectionToken, logWarningInjectionToken } from "@k8slens/logger";
|
||||
import { maybeKubeApiInjectable } from "./maybe-kube-api.injectable";
|
||||
import { podMetricsApiInjectionToken } from "./pod-metrics-api-injection-token";
|
||||
|
||||
export const podMetricsApiInjectable = getInjectable({
|
||||
id: "pod-metrics-api",
|
||||
@@ -26,5 +26,5 @@ export const podMetricsApiInjectable = getInjectable({
|
||||
});
|
||||
},
|
||||
|
||||
injectionToken: kubeApiInjectionToken,
|
||||
injectionToken: podMetricsApiInjectionToken,
|
||||
});
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* 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 { kubeApiInjectionToken } from "@k8slens/kube-api-specifics";
|
||||
import { podMetricsApiInjectable } from "./pod-metrics.api.injectable";
|
||||
|
||||
const podMetricsKubeApiInjectable = getInjectable({
|
||||
id: "pod-metrics-kube-api",
|
||||
instantiate: (di) => di.inject(podMetricsApiInjectable),
|
||||
injectionToken: kubeApiInjectionToken,
|
||||
});
|
||||
|
||||
export default podMetricsKubeApiInjectable;
|
||||
Reference in new issue
Block a user