mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
1 parent
35f081eaf4
commit
62eb0fa592
2 files changed
+6
-4
No files matched your search
@@ -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[]) {
|
||||
|
||||
+2
-3
@@ -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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user