Implement optional writing of the latest process log to console

This commit is contained in:
Kristóf Tóth
2018-05-27 19:02:18 +02:00
parent 2f3ea52b8e
commit 3565b890c4
6 changed files with 29 additions and 5 deletions

View File

@ -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">

View File

@ -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);
}
}