Make ProcessLogService.newLog a BehaviorSubject

This commit is contained in:
Kristóf Tóth 2018-05-30 11:00:54 +02:00
parent 188b3a9631
commit fc10db6cac
2 changed files with 7 additions and 3 deletions

View File

@ -41,7 +41,11 @@ export const config = {
route: 'console',
defaultContent: '',
rewriteContentWithProcessLogs: 'stdout',
showLiveLogs: true
showLiveLogs: true,
defaultLogs: {
stdout: '',
stderr: ''
}
},
testmessenger: {
route: 'testmessenger'

View File

@ -3,13 +3,13 @@
import { Injectable } from '@angular/core';
import { WebSocketService } from './websocket.service';
import { Subject } from 'rxjs/Subject';
import { ProcessLogCommand } from './processlog-command';
import { config } from '../config';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
@Injectable()
export class ProcessLogService {
newLog = new Subject<any>();
newLog = new BehaviorSubject<any>(config.console.defaultLogs);
showLiveLogs = config.console.showLiveLogs;
command_handlers = {