diff --git a/src/app/dashboard/dashboard.component.html b/src/app/dashboard/dashboard.component.html index d636a65..2890300 100644 --- a/src/app/dashboard/dashboard.component.html +++ b/src/app/dashboard/dashboard.component.html @@ -18,7 +18,7 @@ diff --git a/src/app/dashboard/dashboard.component.ts b/src/app/dashboard/dashboard.component.ts index 7fa86eb..b24d865 100644 --- a/src/app/dashboard/dashboard.component.ts +++ b/src/app/dashboard/dashboard.component.ts @@ -26,6 +26,7 @@ export class DashboardComponent implements OnInit, OnDestroy { layout: string = config.dashboard.currentLayout; hideMessages: boolean = config.dashboard.hideMessages; iframeUrl: string = config.dashboard.iframeUrl; + actualIframeUrl: string = this.iframeUrl; selectedTerminalMenuItem: string = config.dashboard.terminalOrConsole; command_handlers = { @@ -117,6 +118,7 @@ export class DashboardComponent implements OnInit, OnDestroy { reloadIframe() { setTimeout(() => { + console.log('reload timeout'); this.webiframe.nativeElement.contentWindow.location.reload(true); }); } @@ -143,10 +145,14 @@ export class DashboardComponent implements OnInit, OnDestroy { } iframeLoad(): void { - this.iframeUrl = this.webiframe.nativeElement.contentDocument.location.href.replace(document.baseURI, '/'); + if (this.webiframe) { + this.actualIframeUrl = this.webiframe.nativeElement.contentWindow.frames.location.pathname; + console.log('load'); + } } changeIframeURL() { - this.webiframe.nativeElement.contentDocument.location.href = document.baseURI + this.urlbar.nativeElement.value.substr(1); + this.webiframe.nativeElement.contentWindow.frames.location.pathname = this.actualIframeUrl; + console.log('change url'); } }