mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix duplicate cluster iframes (#2190)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
2d1183ff7b
commit
d2ae2a5c32
@ -25,8 +25,6 @@ export async function initView(clusterId: ClusterId) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.info(`[LENS-VIEW]: waiting cluster to be ready, clusterId=${clusterId}`);
|
|
||||||
await cluster.whenReady;
|
|
||||||
logger.info(`[LENS-VIEW]: init dashboard, clusterId=${clusterId}`);
|
logger.info(`[LENS-VIEW]: init dashboard, clusterId=${clusterId}`);
|
||||||
const parentElem = document.getElementById("lens-views");
|
const parentElem = document.getElementById("lens-views");
|
||||||
const iframe = document.createElement("iframe");
|
const iframe = document.createElement("iframe");
|
||||||
@ -39,6 +37,8 @@ export async function initView(clusterId: ClusterId) {
|
|||||||
}, { once: true });
|
}, { once: true });
|
||||||
lensViews.set(clusterId, { clusterId, view: iframe });
|
lensViews.set(clusterId, { clusterId, view: iframe });
|
||||||
parentElem.appendChild(iframe);
|
parentElem.appendChild(iframe);
|
||||||
|
logger.info(`[LENS-VIEW]: waiting cluster to be ready, clusterId=${clusterId}`);
|
||||||
|
await cluster.whenReady;
|
||||||
await autoCleanOnRemove(clusterId, iframe);
|
await autoCleanOnRemove(clusterId, iframe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user