mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-07-01 11:06:23 +00:00
Implement optional writing of the latest process log to console
This commit is contained in:
@ -7,6 +7,7 @@ import { Subscription } from 'rxjs';
|
||||
import { WebSocketService } from '../services/websocket.service';
|
||||
import { LayoutCommand } from './layout-command';
|
||||
import { config } from '../config';
|
||||
import { ConsoleComponent } from '../console/console.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-dashboard',
|
||||
@ -20,6 +21,7 @@ export class DashboardComponent implements OnInit, OnDestroy {
|
||||
hide_messages: boolean = config.dashboard.hide_messages;
|
||||
iframeUrl: string = config.dashboard.iframeUrl;
|
||||
@ViewChild('webiframe') webiframe: ElementRef;
|
||||
@ViewChild(ConsoleComponent) childConsole: ConsoleComponent;
|
||||
selectedTerminalMenuItem = config.dashboard.terminalOrConsole;
|
||||
|
||||
command_handlers = {'layout': this.layoutHandler.bind(this),
|
||||
@ -99,4 +101,8 @@ export class DashboardComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
this.selectedTerminalMenuItem = item;
|
||||
}
|
||||
|
||||
setConsoleContent(content: string) {
|
||||
this.childConsole.newLogHandler(content);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user