mirror of
				https://github.com/avatao-content/frontend-tutorial-framework
				synced 2025-11-04 06:52:56 +00:00 
			
		
		
		
	Make ProcessLogService.newLog a BehaviorSubject
This commit is contained in:
		@@ -41,7 +41,11 @@ export const config = {
 | 
			
		||||
    route: 'console',
 | 
			
		||||
    defaultContent: '',
 | 
			
		||||
    rewriteContentWithProcessLogs: 'stdout',
 | 
			
		||||
    showLiveLogs: true
 | 
			
		||||
    showLiveLogs: true,
 | 
			
		||||
    defaultLogs: {
 | 
			
		||||
      stdout: '',
 | 
			
		||||
      stderr: ''
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  testmessenger: {
 | 
			
		||||
    route: 'testmessenger'
 | 
			
		||||
 
 | 
			
		||||
@@ -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 = {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user