mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
set contextName to iframe name
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
49e0d9dad8
commit
156b7960b0
@ -19,10 +19,14 @@ export async function initView(clusterId: ClusterId) {
|
|||||||
if (!clusterId || lensViews.has(clusterId)) {
|
if (!clusterId || lensViews.has(clusterId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const cluster = clusterStore.getById(clusterId);
|
||||||
|
if (!cluster) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
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");
|
||||||
iframe.name = clusterId;
|
iframe.name = cluster.contextName;
|
||||||
iframe.setAttribute("src", getClusterFrameUrl(clusterId))
|
iframe.setAttribute("src", getClusterFrameUrl(clusterId))
|
||||||
iframe.addEventListener("load", () => {
|
iframe.addEventListener("load", () => {
|
||||||
logger.info(`[LENS-VIEW]: loaded from ${iframe.src}`)
|
logger.info(`[LENS-VIEW]: loaded from ${iframe.src}`)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user