mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix ClusterView bugs (#2928)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
1 parent
e1be10b74d
commit
06612409ef
2 files changed
+24
-14
No files matched your search
@@ -56,8 +56,13 @@ export async function initView(clusterId: ClusterId) {
|
||||
parentElem.appendChild(iframe);
|
||||
|
||||
logger.info(`[LENS-VIEW]: waiting cluster to be ready, clusterId=${clusterId}`);
|
||||
await cluster.whenReady;
|
||||
await autoCleanOnRemove(clusterId, iframe);
|
||||
|
||||
try {
|
||||
await when(() => cluster.ready, { timeout: 5_000 }); // we cannot wait forever because cleanup would be blocked for broken cluster connections
|
||||
logger.info(`[LENS-VIEW]: cluster is ready, clusterId=${clusterId}`);
|
||||
} finally {
|
||||
await autoCleanOnRemove(clusterId, iframe);
|
||||
}
|
||||
}
|
||||
|
||||
export async function autoCleanOnRemove(clusterId: ClusterId, iframe: HTMLIFrameElement) {
|
||||
|
||||
Reference in new issue
Block a user