CHE-689 report error when starting agent
Change-Id: I9b49b687c64e58390591b2b268be0afcb71cfd7b Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>6.19.x
parent
73e5fc9cd2
commit
f384efdc27
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue