Implement optional writing of the latest process log to console

This commit is contained in:
Kristóf Tóth
2018-05-27 19:02:18 +02:00
parent 2f3ea52b8e
commit 3565b890c4
6 changed files with 29 additions and 5 deletions

View File

@ -1,7 +1,7 @@
// Copyright (C) 2018 Avatao.com Innovative Learning Kft.
// All Rights Reserved. See LICENSE file for details.
import { ChangeDetectorRef, Component, OnInit } from '@angular/core';
import { ChangeDetectorRef, Component, EventEmitter, OnInit, Output } from '@angular/core';
import * as brace from 'brace';
import 'brace/ext/modelist';
@ -62,6 +62,9 @@ export class IdeComponent implements OnInit {
language: string = config.ide.defaultLanguage;
theme = 'cobalt';
@Output() newLog = new EventEmitter<string>();
options: any = {enableBasicAutocompletion: true,
enableSnippets: true,
enableLiveAutocompletion: true};
@ -96,7 +99,10 @@ export class IdeComponent implements OnInit {
this.processManagerService.init();
this.processManagerService.subscribeCallback(
config.ide.deployProcessName,
(event) => this.deploymentNotificationService.deploying.next(false)
(event) => {
this.deploymentNotificationService.deploying.next(false);
this.newLog.emit(event.data.log);
}
);
this.processManagerService.subscribeSuccessCallback(