mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-01-15 23:41:55 +00:00
Hook process restarting to 'Save' button click
This commit is contained in:
parent
052dbad0e4
commit
848c7ce71b
@ -14,6 +14,7 @@ import 'brace/mode/sql';
|
||||
import 'brace/theme/monokai';
|
||||
import { SourceCode } from './source-code';
|
||||
import { WebSocketService } from '../services/websocket.service';
|
||||
import { ProcessManagerService } from '../services/processmanager.service';
|
||||
|
||||
const modelist = brace.acequire('ace/ext/modelist');
|
||||
|
||||
@ -38,12 +39,14 @@ export class WebideComponent implements OnInit {
|
||||
'write': this.writeHandler.bind(this)};
|
||||
|
||||
constructor(private webSocketService: WebSocketService,
|
||||
private changeDetectorRef: ChangeDetectorRef) { }
|
||||
private changeDetectorRef: ChangeDetectorRef,
|
||||
private processManagerService: ProcessManagerService) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.webSocketService.connect();
|
||||
this.subscribeWS();
|
||||
this.requestCode();
|
||||
this.processManagerService.init('login');
|
||||
}
|
||||
|
||||
subscribeWS() {
|
||||
@ -86,6 +89,7 @@ export class WebideComponent implements OnInit {
|
||||
'content': this.code
|
||||
});
|
||||
this.saveButtonState = 'SAVING';
|
||||
this.processManagerService.restartProcess((event) => { console.log('CICÁK!!'); });
|
||||
}
|
||||
|
||||
requestCode() {
|
||||
|
Loading…
Reference in New Issue
Block a user