mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-07-01 10:36:23 +00:00
Implement changing between terminal menu items
This commit is contained in:
@ -20,7 +20,7 @@ export class DashboardComponent implements OnInit, OnDestroy {
|
||||
hide_messages: boolean = config.dashboard.hide_messages;
|
||||
iframeUrl: string = config.dashboard.iframeUrl;
|
||||
@ViewChild('webiframe') webiframe: ElementRef;
|
||||
terminalOrConsole = config.dashboard.terminalOrConsole;
|
||||
selectedTerminalMenuItem = config.dashboard.terminalOrConsole;
|
||||
|
||||
command_handlers = {'layout': this.layoutHandler.bind(this),
|
||||
'reload_frontend': this.reloadFrontendHandlder.bind(this)};
|
||||
@ -85,4 +85,11 @@ export class DashboardComponent implements OnInit, OnDestroy {
|
||||
this.webiframe.nativeElement.contentWindow.location.reload(true);
|
||||
});
|
||||
}
|
||||
|
||||
selectTerminalMenuItem(item: string) {
|
||||
if (!item.match('(terminal|console)')) {
|
||||
return;
|
||||
}
|
||||
this.selectedTerminalMenuItem = item;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user