mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-04-03 11:52:40 +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.webSocketService.connect();
|
||||||
this.subscribeWS();
|
this.subscribeWS();
|
||||||
this.requestCode();
|
this.requestCode();
|
||||||
this.processManagerService.init();
|
this.initProcessManagerService();
|
||||||
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.resetAutoSaveCountdown();
|
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) {
|
updateFileData(data: SourceCode) {
|
||||||
this.filename = data.filename;
|
this.filename = data.filename;
|
||||||
this.directory = data.directory;
|
this.directory = data.directory;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user