mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-07-02 04:56:22 +00:00
Move live log checking logic to ProcessLogService
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user