mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2024-12-05 02:11:32 +00:00
Refactor ProcessManagerService initialization in IdeComponent
This commit is contained in:
parent
454507615d
commit
5d0fb1ab19
@ -61,12 +61,7 @@ export class IdeComponent implements OnInit {
|
||||
this.webSocketService.connect();
|
||||
this.subscribeWS();
|
||||
this.requestCode();
|
||||
this.processManagerService.init();
|
||||
this.processManagerService.subscribeCallback(config.ide.deployProcessName, (event) => {
|
||||
this.setDeployButtonState('DEPLOYED');
|
||||
this.deploymentNotificationService.deploying.next(false);
|
||||
});
|
||||
this.processManagerService.subscribeErrorCallback(config.ide.deployProcessName, (event) => { this.setDeployButtonState('FAILED'); });
|
||||
this.initProcessManagerService();
|
||||
this.resetAutoSaveCountdown();
|
||||
}
|
||||
|
||||
@ -77,6 +72,15 @@ export class IdeComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
initProcessManagerService() {
|
||||
this.processManagerService.init();
|
||||
this.processManagerService.subscribeCallback(config.ide.deployProcessName, (event) => {
|
||||
this.setDeployButtonState('DEPLOYED');
|
||||
this.deploymentNotificationService.deploying.next(false);
|
||||
});
|
||||
this.processManagerService.subscribeErrorCallback(config.ide.deployProcessName, (event) => { this.setDeployButtonState('FAILED'); });
|
||||
}
|
||||
|
||||
updateFileData(data: SourceCode) {
|
||||
this.filename = data.filename;
|
||||
this.directory = data.directory;
|
||||
|
Loading…
Reference in New Issue
Block a user