mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-06-28 23:15:12 +00:00
Implement optional writing of the latest process log to console
This commit is contained in:
@ -20,7 +20,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="tfw-ide">
|
||||
<app-ide></app-ide>
|
||||
<app-ide (newLog)="setConsoleContent($event)"></app-ide>
|
||||
</div>
|
||||
<div class="tfw-terminal">
|
||||
<div class="btn-group btn-group-sm flex-wrap tao-grid-center-left tfw-console-terminal-menu">
|
||||
|
@ -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