Move live log checking logic to ProcessLogService

This commit is contained in:
Kristóf Tóth
2018-05-30 11:14:48 +02:00
parent fc10db6cac
commit c889de0b05
5 changed files with 17 additions and 13 deletions

View File

@ -29,7 +29,7 @@ export class ConsoleComponent implements OnInit {
this.webSocketService.observeKey<ConsoleCommand>('console').subscribe(
(event) => this.command_handlers[event.data.command](event.data)
);
this.processLogService.newLog.subscribe((data) => this.newLogHandler(data));
this.processLogService.newLogs.subscribe((data) => this.newLogsHandler(data));
}
writeHandler(data: ConsoleCommand) {
@ -40,7 +40,7 @@ export class ConsoleComponent implements OnInit {
this.sendContent(this.console_content);
}
newLogHandler(logs: any) {
newLogsHandler(logs: any) {
if (this.rewriteContentWithProcessLogs !== '') {
const log = logs[this.rewriteContentWithProcessLogs];
if (log) {