mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
1 parent
67377af52e
commit
c06c322ca9
5 files changed
+39
-26
No files matched your search
@@ -84,7 +84,7 @@ export class KubeAuthProxy {
|
||||
const channel = `kube-auth:${this.cluster.id}`
|
||||
const message = { data, stream };
|
||||
logger.debug(channel, message);
|
||||
broadcastMessage(channel, message);
|
||||
broadcastMessage({ channel }, message);
|
||||
}
|
||||
|
||||
public exit() {
|
||||
|
||||
@@ -5,6 +5,8 @@ import type { ClusterId } from "../common/cluster-store";
|
||||
import { clusterStore } from "../common/cluster-store";
|
||||
import logger from "./logger";
|
||||
|
||||
// fixme: activate landing-page when no-clusters exists
|
||||
|
||||
export class WindowManager {
|
||||
protected activeView: BrowserWindow;
|
||||
protected views = new Map<ClusterId, BrowserWindow>();
|
||||
@@ -68,11 +70,12 @@ export class WindowManager {
|
||||
const activeView = this.activeView;
|
||||
const isLoadedBefore = !!this.getView(clusterId);
|
||||
const view = this.initView(clusterId);
|
||||
logger.info(`Activating cluster(${cluster.id}) view`, {
|
||||
logger.info(`[WINDOW-MANAGER]: activating cluster view`, {
|
||||
id: cluster.id,
|
||||
contextName: cluster.contextName,
|
||||
isLoadedBefore: isLoadedBefore,
|
||||
});
|
||||
if (view !== activeView) {
|
||||
if (activeView !== view) {
|
||||
if (!isLoadedBefore) {
|
||||
await cluster.whenReady;
|
||||
await view.loadURL(cluster.webContentUrl);
|
||||
@@ -86,7 +89,10 @@ export class WindowManager {
|
||||
this.activeView = view;
|
||||
}
|
||||
} catch (err) {
|
||||
logger.error(`Activating cluster(${clusterId}) view has failed: ${err.stack}`);
|
||||
logger.error(`[WINDOW-MANAGER]: can't activate cluster view`, {
|
||||
clusterId: cluster.id,
|
||||
err: String(err),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user