Implement changing rewriteContentWith.. config from console API

This commit is contained in:
Kristóf Tóth 2018-05-30 11:44:40 +02:00
parent d13935511b
commit e77bd88963
2 changed files with 9 additions and 3 deletions

View File

@ -5,4 +5,5 @@ export class ConsoleCommand {
command: string;
content?: string;
showLiveLogs?: boolean;
rewriteContentWithProcessLogsOnDeploy?: string;
}

View File

@ -17,9 +17,10 @@ export class ConsoleComponent implements OnInit {
rewriteContentWithProcessLogsOnDeploy: string = config.console.rewriteContentWithProcessLogsOnDeploy;
command_handlers = {
'write': this.writeHandler.bind(this),
'read': this.readHandler.bind(this),
'showLiveLogs': this.showLiveLogsHandler.bind(this)
'write': this.writeHandler.bind(this),
'read': this.readHandler.bind(this),
'showLiveLogs': this.showLiveLogsHandler.bind(this),
'rewriteContentWithProcessLogsOnDeploy': this.rewriteContentWithProcessLogsOnDeployHandler.bind(this)
};
constructor(private webSocketService: WebSocketService,
@ -54,6 +55,10 @@ export class ConsoleComponent implements OnInit {
this.processLogService.showLiveLogs = data.showLiveLogs;
}
rewriteContentWithProcessLogsOnDeployHandler(data: ConsoleCommand) {
this.rewriteContentWithProcessLogsOnDeploy = data.rewriteContentWithProcessLogsOnDeploy;
}
setContent(content: string) {
this.console_content = content;
}