mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2024-12-05 02:21:31 +00:00
Implement changing showLiveLogs config from console API
This commit is contained in:
parent
c889de0b05
commit
ec757bb21d
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user