mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Remove logging frameId as unnecessary
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
ae6caea65f
commit
98740c919a
@ -1,13 +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 webFrameInjectable from "./web-frame.injectable";
|
||||
|
||||
const frameRoutingIdInjectable = getInjectable({
|
||||
id: "frame-routing-id",
|
||||
instantiate: (di) => di.inject(webFrameInjectable).routingId,
|
||||
});
|
||||
|
||||
export default frameRoutingIdInjectable;
|
||||
@ -1,14 +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 { webFrame } from "electron";
|
||||
|
||||
const webFrameInjectable = getInjectable({
|
||||
id: "web-frame",
|
||||
instantiate: () => webFrame,
|
||||
causesSideEffects: true,
|
||||
});
|
||||
|
||||
export default webFrameInjectable;
|
||||
@ -5,7 +5,6 @@
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { once } from "lodash";
|
||||
import prefixedLoggerInjectable from "../../../common/logger/prefixed-logger.injectable";
|
||||
import frameRoutingIdInjectable from "../../../features/electron/renderer/frame-routing-id.injectable";
|
||||
import clusterFrameClusterInjectable from "../../cluster-frame-context/cluster-frame-cluster.injectable";
|
||||
import closeRendererLogFileInjectable from "../../logger/close-renderer-log-file.injectable";
|
||||
import unmountRootComponentInjectable from "../../window/unmount-root-component.injectable";
|
||||
@ -14,13 +13,12 @@ const handleOnClusterFrameCloseInjectable = getInjectable({
|
||||
id: "handle-on-cluster-frame-close",
|
||||
instantiate: (di) => {
|
||||
const cluster = di.inject(clusterFrameClusterInjectable);
|
||||
const frameRoutingId = di.inject(frameRoutingIdInjectable);
|
||||
const logger = di.inject(prefixedLoggerInjectable, "CLUSTER-FRAME");
|
||||
const closeFileLogging = di.inject(closeRendererLogFileInjectable);
|
||||
const unmountRootComponent = di.inject(unmountRootComponentInjectable);
|
||||
|
||||
const onCloseFrame = once(() => {
|
||||
logger.info(`Unload dashboard, clusterId=${(cluster.id)}, frameId=${frameRoutingId}`);
|
||||
logger.info(`Unload dashboard, clusterId=${(cluster.id)}`);
|
||||
closeFileLogging();
|
||||
unmountRootComponent();
|
||||
});
|
||||
|
||||
@ -6,7 +6,6 @@ import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { when } from "mobx";
|
||||
import prefixedLoggerInjectable from "../../../common/logger/prefixed-logger.injectable";
|
||||
import requestSetClusterFrameIdInjectable from "../../../features/cluster/frame-id/renderer/request-set-frame-id.injectable";
|
||||
import frameRoutingIdInjectable from "../../../features/electron/renderer/frame-routing-id.injectable";
|
||||
import { beforeClusterFrameStartsSecondInjectionToken } from "../../before-frame-starts/tokens";
|
||||
import clusterFrameClusterInjectable from "../../cluster-frame-context/cluster-frame-cluster.injectable";
|
||||
|
||||
@ -18,9 +17,8 @@ const waitForClusterToFinishActivatingInjectable = getInjectable({
|
||||
const cluster = di.inject(clusterFrameClusterInjectable);
|
||||
const requestSetClusterFrameId = di.inject(requestSetClusterFrameIdInjectable);
|
||||
const logger = di.inject(prefixedLoggerInjectable, "CLUSTER-FRAME");
|
||||
const frameRoutingId = di.inject(frameRoutingIdInjectable);
|
||||
|
||||
logger.info(`Init dashboard, clusterId=${cluster.id}, frameId=${frameRoutingId}`);
|
||||
logger.info(`Init dashboard, clusterId=${cluster.id}`);
|
||||
|
||||
await requestSetClusterFrameId(cluster.id);
|
||||
await when(() => cluster.ready); // cluster.activate() is done at this point
|
||||
|
||||
Loading…
Reference in New Issue
Block a user