CHE-689 report error when starting agent

Change-Id: I9b49b687c64e58390591b2b268be0afcb71cfd7b
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
6.19.x
Florent BENOIT 2016-03-02 14:12:41 +01:00
parent 73e5fc9cd2
commit f384efdc27
2 changed files with 27 additions and 0 deletions

View File

@ -173,6 +173,19 @@ class IdeSvc {
}
let agentStep = 2;
if (message.eventType === 'ERROR' && message.workspaceId === data.id) {
this.steps[agentStep].hasError = true;
// need to show the error
this.$mdDialog.show(
this.$mdDialog.alert()
.title('Error when starting agent')
.content('Unable to start workspace agent. Error when trying to start the workspace agent: ' + message.error)
.ariaLabel('Workspace agent start')
.ok('OK')
);
}
if (this.steps[agentStep].logs.length > 0) {
this.steps[agentStep].logs = this.steps[agentStep].logs + '\n' + message;
} else {

View File

@ -855,6 +855,20 @@ export class CreateProjectCtrl {
this.listeningChannels.push(workspaceChannel);
bus.subscribe(workspaceChannel, (message) => {
if (message.eventType === 'ERROR' && message.workspaceId === data.id) {
this.createProjectSvc.setCurrentProgressStep(2);
this.getCreationSteps()[this.getCurrentProgressStep()].hasError = true;
// need to show the error
this.$mdDialog.show(
this.$mdDialog.alert()
.title('Error when starting agent')
.content('Unable to start workspace agent. Error when trying to start the workspace agent: ' + message.error)
.ariaLabel('Workspace agent start')
.ok('OK')
);
}
if (message.eventType === 'RUNNING' && message.workspaceId === data.id) {
this.createProjectSvc.setCurrentProgressStep(2);