Implement changing showLiveLogs config from console API

This commit is contained in:
Kristóf Tóth 2018-05-30 11:27:25 +02:00
parent c889de0b05
commit ec757bb21d
2 changed files with 8 additions and 2 deletions

View File

@ -4,4 +4,5 @@
export class ConsoleCommand {
command: string;
content?: string;
showLiveLogs?: boolean;
}

View File

@ -17,8 +17,9 @@ export class ConsoleComponent implements OnInit {
rewriteContentWithProcessLogs: string = config.console.rewriteContentWithProcessLogs;
command_handlers = {
'write': this.writeHandler.bind(this),
'read': this.readHandler.bind(this)
'write': this.writeHandler.bind(this),
'read': this.readHandler.bind(this),
'showLiveLogs': this.showLiveLogsHandler.bind(this)
};
constructor(private webSocketService: WebSocketService,
@ -49,6 +50,10 @@ export class ConsoleComponent implements OnInit {
}
}
showLiveLogsHandler(data: ConsoleCommand) {
this.processLogService.showLiveLogs = data.showLiveLogs;
}
setContent(content: string) {
this.console_content = content;
}