mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fixes
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
parent
35f081eaf4
commit
62eb0fa592
@ -16,7 +16,10 @@ export interface IpcMessageHandler {
|
||||
}
|
||||
|
||||
export function sendMessage(channel: IpcChannel, ...args: any[]) {
|
||||
webContents.getFocusedWebContents().send(channel, ...args);
|
||||
const webContent = webContents.getFocusedWebContents();
|
||||
if (webContent) {
|
||||
webContent.send(channel, ...args);
|
||||
}
|
||||
}
|
||||
|
||||
export async function invokeMessage(channel: IpcChannel, ...args: any[]) {
|
||||
|
||||
@ -71,14 +71,13 @@ export class Cluster implements ClusterModel {
|
||||
async init(proxyPort: number) {
|
||||
try {
|
||||
this.proxyPort = proxyPort;
|
||||
this.contextHandler = new ContextHandler(this);
|
||||
this.kubeconfigManager = new KubeconfigManager(this, this.contextHandler);
|
||||
|
||||
this.url = this.getKubeconfig().getCurrentCluster().server;
|
||||
this.proxyUrl = `http://localhost:${proxyPort}`;
|
||||
this.kubeProxyUrl = this.proxyUrl + apiKubePrefix;
|
||||
this.webContentUrl = `http://${this.id}.localhost:${proxyPort}`;
|
||||
|
||||
this.contextHandler = new ContextHandler(this);
|
||||
this.kubeconfigManager = new KubeconfigManager(this, this.contextHandler);
|
||||
await this.refreshStatus();
|
||||
this.initialized = true;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user