mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Add better logging
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
c429509a5b
commit
33b95970df
@ -37,11 +37,18 @@ export class ClusterFrameHandler {
|
|||||||
@action
|
@action
|
||||||
public initView(clusterId: ClusterId) {
|
public initView(clusterId: ClusterId) {
|
||||||
const cluster = this.dependencies.getClusterById(clusterId);
|
const cluster = this.dependencies.getClusterById(clusterId);
|
||||||
|
|
||||||
|
if (!cluster) {
|
||||||
|
this.dependencies.logger.warn(`[LENS-VIEW]: not initializing view; unknown clusterId="${clusterId}"`);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const parentElem = document.getElementById("lens-views");
|
const parentElem = document.getElementById("lens-views");
|
||||||
|
|
||||||
assert(parentElem, "DOM with #lens-views must be present");
|
assert(parentElem, "DOM with #lens-views must be present");
|
||||||
|
|
||||||
if (!cluster || this.views.has(clusterId)) {
|
if (this.views.has(clusterId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user