mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix: infinite spinner with no-clusters view
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
1 parent
be52b4ad93
commit
4087cf025e
5 files changed
+15
-6
No files matched your search
@@ -7,7 +7,7 @@ import { openShell } from "./node-shell-session";
|
||||
import { Router } from "./router"
|
||||
import { ClusterManager } from "./cluster-manager"
|
||||
import { ContextHandler } from "./context-handler";
|
||||
import { apiKubePrefix } from "../common/vars";
|
||||
import { apiKubePrefix, noClustersHost } from "../common/vars";
|
||||
import logger from "./logger"
|
||||
|
||||
export class LensProxy {
|
||||
@@ -117,7 +117,7 @@ export class LensProxy {
|
||||
}
|
||||
|
||||
protected async handleRequest(proxy: httpProxy, req: http.IncomingMessage, res: http.ServerResponse) {
|
||||
if (req.headers.host.split(":")[0] === "no-clusters.localhost") {
|
||||
if (req.headers.host.split(":")[0] === noClustersHost) {
|
||||
this.router.handleStaticFile(req.url, res);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import { BrowserWindow, shell } from "electron"
|
||||
import windowStateKeeper from "electron-window-state"
|
||||
import type { ClusterId } from "../common/cluster-store";
|
||||
import { clusterStore } from "../common/cluster-store";
|
||||
import { noClustersHost } from "../common/vars";
|
||||
import logger from "./logger";
|
||||
|
||||
export class WindowManager {
|
||||
@@ -53,7 +54,7 @@ export class WindowManager {
|
||||
protected handleNoClustersView = async ({ activate = false } = {}) => {
|
||||
if (!this.noClustersWindow) {
|
||||
this.noClustersWindow = this.initClusterView(null);
|
||||
await this.noClustersWindow.loadURL(`http://no-clusters.localhost:${this.proxyPort}`);
|
||||
await this.noClustersWindow.loadURL(`http://${noClustersHost}:${this.proxyPort}`);
|
||||
}
|
||||
if (activate) {
|
||||
this.activeView = this.noClustersWindow;
|
||||
|
||||
Reference in new issue
Block a user