mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-07-12 15:56:24 +00:00
Rename interfaces and variables
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { WebSocketService } from './websocket.service';
|
||||
import { LogMessage } from '../message-types/log-message';
|
||||
import { ProcessLogCommand } from '../message-types/process-log-command';
|
||||
import { ProcessLogMessage } from '../message-types/process-log-message';
|
||||
import { config } from '../config';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
|
||||
@ -15,8 +15,8 @@ export class ProcessLogService {
|
||||
|
||||
constructor(private webSocketService: WebSocketService) {
|
||||
this.webSocketService.connect();
|
||||
this.webSocketService.observeKey<ProcessLogCommand>('log.new').subscribe(
|
||||
(event) => this.newLogsHandler(event)
|
||||
this.webSocketService.observeKey<ProcessLogMessage>('process.log.new').subscribe(
|
||||
(message) => this.newLogsHandler(message)
|
||||
);
|
||||
}
|
||||
|
||||
@ -26,11 +26,11 @@ export class ProcessLogService {
|
||||
}
|
||||
}
|
||||
|
||||
newLogsHandler(data: ProcessLogCommand) {
|
||||
newLogsHandler(message: ProcessLogMessage) {
|
||||
if (this.showLiveLogs) {
|
||||
this.newLogs.next({
|
||||
stdout: data.stdout,
|
||||
stderr: data.stderr
|
||||
stdout: message.stdout,
|
||||
stderr: message.stderr
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user