Skip to content

Commit

Permalink
fix request execution result
Browse files Browse the repository at this point in the history
  • Loading branch information
salmma committed Aug 7, 2024
1 parent 817d4d6 commit ccd14f8
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ export class NisqAnalyzerComponent implements OnInit {

showAnalysisResult(analysisJob: AnalysisJobDto): boolean {
this.nisqAnalyzerService.getJob(analysisJob.id).subscribe((jobResult) => {
this.analyzerResults = [];
this.jobReady = jobResult.ready;
this.analyzerJob = jobResult;
this.analyzerResults = jobResult.analysisResultList;
Expand All @@ -377,6 +378,10 @@ export class NisqAnalyzerComponent implements OnInit {
});
});
});
this.pollAnalysisJobData(
analysisJob.initialMcdaMethod,
analysisJob.initialMcdaJob
);
return true;
}

Expand Down Expand Up @@ -549,8 +554,8 @@ export class NisqAnalyzerComponent implements OnInit {
}

hasExecutionResult(analysisResult: QpuSelectionResultDto): void {
this.analysisResultService
.getAnalysisResult({ resId: analysisResult.id })
this.qpuSelectionService
.getQpuSelectionResult({ resId: analysisResult.id })
.subscribe((result) => {
this.executionResultsAvailable[analysisResult.id] = !!Object.keys(
result._links
Expand All @@ -566,17 +571,17 @@ export class NisqAnalyzerComponent implements OnInit {
this.expandedElementExecResult = undefined;
return;
}
this.analysisResultService
.getAnalysisResult({ resId: analysisResult.id })
this.qpuSelectionService
.getQpuSelectionResult({ resId: analysisResult.id })
.subscribe((result) => {
const key = Object.keys(result._links).find((k) =>
k.startsWith('execute-')
);
const href = result._links[key].href;
this.http.get<ExecutionResultDto>(href).subscribe((dto) => {
this.expandedElement = analysisResult;
this.expandedElementExecResult = dto;
this.expandedElementMap.set(analysisResult, dto);
this.expandedElementExecResult = dto;
});
});
}
Expand Down

0 comments on commit ccd14f8

Please sign in to comment.