mirror of
				https://github.com/avatao-content/frontend-tutorial-framework
				synced 2025-11-04 13:52:55 +00:00 
			
		
		
		
	Implement changing showLiveLogs config from console API
This commit is contained in:
		@@ -4,4 +4,5 @@
 | 
			
		||||
export class ConsoleCommand {
 | 
			
		||||
  command: string;
 | 
			
		||||
  content?: string;
 | 
			
		||||
  showLiveLogs?: boolean;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -17,8 +17,9 @@ export class ConsoleComponent implements OnInit {
 | 
			
		||||
  rewriteContentWithProcessLogs: string = config.console.rewriteContentWithProcessLogs;
 | 
			
		||||
 | 
			
		||||
  command_handlers = {
 | 
			
		||||
    'write': this.writeHandler.bind(this),
 | 
			
		||||
    'read':  this.readHandler.bind(this)
 | 
			
		||||
    'write':        this.writeHandler.bind(this),
 | 
			
		||||
    'read':         this.readHandler.bind(this),
 | 
			
		||||
    'showLiveLogs': this.showLiveLogsHandler.bind(this)
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  constructor(private webSocketService: WebSocketService,
 | 
			
		||||
@@ -49,6 +50,10 @@ export class ConsoleComponent implements OnInit {
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  showLiveLogsHandler(data: ConsoleCommand) {
 | 
			
		||||
    this.processLogService.showLiveLogs = data.showLiveLogs;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  setContent(content: string) {
 | 
			
		||||
    this.console_content = content;
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user