mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-06-28 16:15:11 +00:00
Implement iframe reload on deployment
This commit is contained in:
@ -62,7 +62,10 @@ export class IdeComponent implements OnInit {
|
||||
this.subscribeWS();
|
||||
this.requestCode();
|
||||
this.processManagerService.init();
|
||||
this.processManagerService.subscribeCallback(config.ide.deployProcessName, (event) => { this.setDeployButtonState('DEPLOYED'); });
|
||||
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();
|
||||
}
|
||||
@ -126,13 +129,15 @@ export class IdeComponent implements OnInit {
|
||||
}
|
||||
|
||||
setDeployButtonState(state: string) {
|
||||
this.deployButtonState = state;
|
||||
this.deploymentNotificationService.deploying.next(state === 'DEPLOYING' ? true : false);
|
||||
if (state.match('DEPLOYED|DEPLOYING|FAILED|TODEPLOY')) {
|
||||
this.deployButtonState = state;
|
||||
}
|
||||
}
|
||||
|
||||
deployCode() {
|
||||
this.processManagerService.restartProcess(config.ide.deployProcessName);
|
||||
this.setDeployButtonState('DEPLOYING');
|
||||
this.deploymentNotificationService.deploying.next(true);
|
||||
}
|
||||
|
||||
sendCodeIfDirty() {
|
||||
|
Reference in New Issue
Block a user