From ec757bb21d35960e00a011a2abc26a4e18eed8fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Wed, 30 May 2018 11:27:25 +0200 Subject: [PATCH] Implement changing showLiveLogs config from console API --- src/app/console/console-command.ts | 1 + src/app/console/console.component.ts | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/app/console/console-command.ts b/src/app/console/console-command.ts index 7f05c2b..2c4a1d5 100644 --- a/src/app/console/console-command.ts +++ b/src/app/console/console-command.ts @@ -4,4 +4,5 @@ export class ConsoleCommand { command: string; content?: string; + showLiveLogs?: boolean; } diff --git a/src/app/console/console.component.ts b/src/app/console/console.component.ts index e6ab31d..7e1d4d3 100644 --- a/src/app/console/console.component.ts +++ b/src/app/console/console.component.ts @@ -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; }