mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-07-02 05:36:24 +00:00
Implement optional writing of the latest process log to console
This commit is contained in:
@ -29,13 +29,23 @@ export class ConsoleComponent implements OnInit {
|
||||
}
|
||||
|
||||
writeHandler(data: ConsoleCommand) {
|
||||
this.console_content = data.content;
|
||||
this.setContent(data.content);
|
||||
}
|
||||
|
||||
readHandler(data: ConsoleCommand) {
|
||||
this.sendContent(this.console_content);
|
||||
}
|
||||
|
||||
newLogHandler(content: string) {
|
||||
if (config.console.rewriteContentWithNewLogs) {
|
||||
this.setContent(content);
|
||||
}
|
||||
}
|
||||
|
||||
setContent(content: string) {
|
||||
this.console_content = content;
|
||||
}
|
||||
|
||||
sendContent(content: string) {
|
||||
this.webSocketService.send('console', {
|
||||
'command': 'read',
|
||||
|
Reference in New Issue
Block a user