Add url bar controller

This commit is contained in:
balazs
2019-01-21 17:00:13 +01:00
parent d4081f4751
commit 6d136c9279
2 changed files with 12 additions and 3 deletions

View File

@ -21,6 +21,7 @@ export class DashboardComponent implements OnInit, OnDestroy {
deploymentNotificationSubscription: Subscription;
@ViewChild('webiframe') webiframe: ElementRef;
@ViewChild('tfwmessages') messages: ElementRef;
@ViewChild('urlbar') urlbar: ElementRef;
layout: string = config.dashboard.currentLayout;
hideMessages: boolean = config.dashboard.hideMessages;
@ -144,4 +145,8 @@ export class DashboardComponent implements OnInit, OnDestroy {
iframeLoad(): void {
this.iframeUrl = this.webiframe.nativeElement.contentDocument.location.href.replace(document.baseURI, '/');
}
changeIframeURL() {
this.webiframe.nativeElement.contentDocument.location.href = document.baseURI + this.urlbar.nativeElement.value.substr(1);
}
}