use of org.guvnor.ala.ui.model.PipelineError in project kie-wb-common by kiegroup.
the class RuntimePresenter method showPipelineError.
protected void showPipelineError() {
PipelineError error = item.getPipelineTrace().getPipelineError();
popupHelper.showErrorPopup(error.getError(), error.getErrorDetail());
}
use of org.guvnor.ala.ui.model.PipelineError in project kie-wb-common by kiegroup.
the class RuntimePresenterActionsTest method testShowPipelineExecutionError.
@Test
public void testShowPipelineExecutionError() {
trace = mockPipelineExecutionTrace(EXECUTION_ID, mockPipeline(PIPELINE_NAME, STAGE_NUMBER), mock(PipelineStatus.class), mock(PipelineStatus.class));
trace.setPipelineStatus(PipelineStatus.ERROR);
trace.setPipelineError(new PipelineError(PIPELINE_ERROR, PIPELINE_ERROR_DETAIL));
item = new RuntimeListItem(RUNTIME_NAME, trace);
presenter.setup(item);
presenter.showPipelineError();
verify(popupHelper, times(1)).showErrorPopup(PIPELINE_ERROR, PIPELINE_ERROR_DETAIL);
}
use of org.guvnor.ala.ui.model.PipelineError in project kie-wb-common by kiegroup.
the class RuntimeListItemBuilder method build.
public RuntimeListItem build() {
RuntimeListItem result;
PipelineExecutionTrace pipelineTrace;
String runtimeName;
if (item.getRuntimeName() != null) {
runtimeName = item.getRuntimeName();
} else {
runtimeName = item.getRuntimeId();
}
if (item.getPipelineExecutionId() != null) {
final Pipeline pipeline = new Pipeline(new PipelineKey(item.getPipelineId()));
pipelineTrace = new PipelineExecutionTrace(new PipelineExecutionTraceKey(item.getPipelineExecutionId()));
pipelineTrace.setPipelineStatus(transformToPipelineStatus(item.getPipelineStatus()));
pipelineTrace.setPipelineError(new PipelineError(item.getPipelineError(), item.getPipelineErrorDetail()));
item.getPipelineStageItems().getItems().forEach(stage -> {
pipeline.addStage(new Stage(pipeline.getKey(), stage.getName()));
pipelineTrace.setStageStatus(stage.getName(), transformToPipelineStatus(stage.getStatus()));
pipelineTrace.setStageError(stage.getName(), new PipelineError(stage.getStageError(), stage.getStageErrorDetail()));
});
pipelineTrace.setPipeline(pipeline);
} else {
pipelineTrace = null;
}
if (item.getRuntimeId() != null) {
final Runtime runtime = new Runtime(new RuntimeKey(new ProviderKey(new ProviderTypeKey(item.getProviderTypeName(), item.getProviderVersion()), item.getProviderId()), item.getRuntimeId()), item.getRuntimeStatus(), item.getRuntimeEndpoint(), item.getStartedAt());
runtime.setPipelineTrace(pipelineTrace);
result = new RuntimeListItem(runtimeName, runtime);
} else {
result = new RuntimeListItem(runtimeName, pipelineTrace);
}
return result;
}
Aggregations