Rename interfaces and variables

This commit is contained in:
R. Richard
2019-08-08 14:44:40 +02:00
parent 6b25416973
commit 6e22e7efe9
19 changed files with 90 additions and 130 deletions

View File

@ -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
});
}
}