1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fix build type errors

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2023-01-09 11:13:27 -05:00
parent 14f50a3f58
commit 6d0e5277aa
3 changed files with 9 additions and 9 deletions

View File

@ -5,7 +5,6 @@
import { getInjectable } from "@ogre-tools/injectable";
import FormData from "form-data";
import type { Cluster } from "../common/cluster/cluster";
import { withTimeout } from "../common/fetch/timeout-controller";
import type { RequestMetricsParams } from "../common/k8s-api/endpoints/metrics.api/request-metrics.injectable";
import k8sRequestInjectable from "./k8s-request.injectable";
@ -30,12 +29,10 @@ const getMetricsInjectable = getInjectable({
body.append(key, value);
}
const controller = withTimeout(60 * 1000); // 1 minute timeout
return k8sRequest(cluster, metricsPath, {
signal: controller.signal,
method: "POST",
body,
timeout: 60 * 1000,
});
};
},

View File

@ -13,11 +13,10 @@ const getVisibleWindowsInjectable = getInjectable({
instantiate: (di) => {
const getAllLensWindows = () => di.injectMany(applicationWindowInjectionToken);
return () =>
pipeline(
getAllLensWindows(),
filter((lensWindow) => !!lensWindow.isVisible),
);
return () => pipeline(
getAllLensWindows(),
filter((lensWindow) => !!lensWindow.isVisible),
);
},
});

View File

@ -29,6 +29,8 @@ describe("message-to-channel", () => {
start: async () => {},
close: () => {},
isVisible: true,
canGoBack: () => false,
canGoForward: () => false,
},
{
@ -40,6 +42,8 @@ describe("message-to-channel", () => {
start: async () => {},
close: () => {},
isVisible: true,
canGoBack: () => false,
canGoForward: () => false,
},
]);