From 6cc90abfd2752c79ffcbe3abb9f5757715ac7f58 Mon Sep 17 00:00:00 2001 From: yingfeng-iu Date: Mon, 16 Oct 2023 17:44:35 -0400 Subject: [PATCH] AMP-3015: - update API call urls - update MGM eval test findByIds API call --- .../evaluation/TestResultsVisualiz.vue | 3 +-- src/service/evaluation-service.js | 17 +++++++++-------- src/service/workflow-result-service.js | 12 ++++++------ src/service/workflow-service.js | 4 ++-- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/components/evaluation/TestResultsVisualiz.vue b/src/components/evaluation/TestResultsVisualiz.vue index 67184504..a053e07b 100644 --- a/src/components/evaluation/TestResultsVisualiz.vue +++ b/src/components/evaluation/TestResultsVisualiz.vue @@ -563,8 +563,7 @@ export default { const mgmReviewOutput = await self.evaluationService.getMgmReviewOutput( testResultIds ); - self.mgmEvaluationTests = - mgmReviewOutput.data._embedded.mgmEvaluationTests; + self.mgmEvaluationTests = mgmReviewOutput; self.selectedTestResult = self.mgmEvaluationTests[0]; //Structure of bar chart data diff --git a/src/service/evaluation-service.js b/src/service/evaluation-service.js index 38aaae14..b046a635 100644 --- a/src/service/evaluation-service.js +++ b/src/service/evaluation-service.js @@ -34,9 +34,7 @@ export default class EvaluationService extends BaseService { */ async getDetailParametersMgmScoringTool(id) { - return super.get_auth( - `/mgmScoringTools/${id}/parameters?projection=detail` - ); + return super.get_auth(`/mgmScoringTools/${id}/parameters?projection=detail`); } /*** @@ -46,7 +44,7 @@ export default class EvaluationService extends BaseService { async getMgmEvaluationTestResults(searchQuery) { var data = await super - .post_auth("/mgm-evaluation-test/query", searchQuery) + .post_auth("/mgmEvaluationTests/query", searchQuery) .then((result) => { return result.data; }); @@ -60,7 +58,7 @@ export default class EvaluationService extends BaseService { async mgmSubmitNewTest(body) { var data = await super - .post_auth("/mgm-evaluation-test/create", body) + .post_auth("/mgmEvaluationTests/create", body) .then((result) => { return result.data; }); @@ -73,9 +71,12 @@ export default class EvaluationService extends BaseService { */ async getMgmReviewOutput(ids) { - return super.get_auth( - `/mgmEvaluationTests/search/findByIds?ids=${ids}&projection=detail` - ); + var data = await super + .get_auth(`/mgmEvaluationTests?ids=${ids}`) + .then((result) => { + return result.data; + }); + return data; } // To download any file by it's name diff --git a/src/service/workflow-result-service.js b/src/service/workflow-result-service.js index d3c35b80..8375251a 100644 --- a/src/service/workflow-result-service.js +++ b/src/service/workflow-result-service.js @@ -3,7 +3,7 @@ import { env } from "../helpers/env"; export default class WorkflowResultService extends BaseService { async getWorkflowResults(searchQuery, actionType, targetType) { - var url = "/workflow-results/query"; + var url = "/workflowResults/query"; if (actionType && targetType) { url = url + "?actionType=" + actionType + "&targetType=" + targetType; } @@ -24,7 +24,7 @@ export default class WorkflowResultService extends BaseService { async exportWorkflowResults(searchQuery) { var data = await super - .post_auth("/workflow-results/export", searchQuery) + .post_auth("/workflowResults/export", searchQuery) .then((result) => { return result.data; }); @@ -32,7 +32,7 @@ export default class WorkflowResultService extends BaseService { } async setWorkflowResultFinal(id, isFinal) { var data = await super - .patch_auth("/workflow-results/" + id + "?isFinal=" + isFinal, null) + .patch_auth("/workflowResults/" + id + "?isFinal=" + isFinal, null) .then((result) => { return result.data; }); @@ -41,7 +41,7 @@ export default class WorkflowResultService extends BaseService { async updateWorkflowResult(id, outputLabel) { var data = await super .patch_auth( - "/workflow-results/" + + "/workflowResults/" + id + "?outputLabel=" + outputLabel + @@ -64,7 +64,7 @@ export default class WorkflowResultService extends BaseService { // get symlink for workflow result output async getOutputSymlink(id) { - const url = `/workflow-results/${id}/output`; + const url = `/workflowResults/${id}/output`; var symlink = await super.get_auth(url).then((result) => { return result.data; }); @@ -100,6 +100,6 @@ export default class WorkflowResultService extends BaseService { } async deleteWorkflowResult(id) { - await super.delete_auth(`/workflow-results/${id}`); + await super.delete_auth(`/workflowResults/${id}`); } } diff --git a/src/service/workflow-service.js b/src/service/workflow-service.js index ef20b62c..d06868d7 100644 --- a/src/service/workflow-service.js +++ b/src/service/workflow-service.js @@ -12,14 +12,14 @@ export default class WorkflowService extends BaseService { async searchIntermediateFiles(searchWord, outputTypes) { return await super .get_auth( - "/workflow-results/intermediate/primaryfiles?outputTypes=" + outputTypes + "&keyword=" + encodeURIComponent(searchWord) + "/workflowResults/intermediate/primaryfiles?outputTypes=" + outputTypes + "&keyword=" + encodeURIComponent(searchWord) ).then((response) => response.data); } async getCompleteWorkflowResultsForPrimaryfileOutputTypes(outputTypes, primaryfileId) { return await super .get_auth( - "/workflow-results/intermediate/outputs?outputTypes=" + outputTypes + "&primaryfileId=" + primaryfileId + "/workflowResults/intermediate/outputs?outputTypes=" + outputTypes + "&primaryfileId=" + primaryfileId ).then((response) => response.data); }