Skip to content

Commit

Permalink
AMP-3015:
Browse files Browse the repository at this point in the history
- update API call urls
- update MGM eval test findByIds API call
  • Loading branch information
yingfeng-iu committed Oct 16, 2023
1 parent 6a1725e commit 6cc90ab
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
3 changes: 1 addition & 2 deletions src/components/evaluation/TestResultsVisualiz.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 9 additions & 8 deletions src/service/evaluation-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
}

/***
Expand All @@ -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;
});
Expand All @@ -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;
});
Expand All @@ -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
Expand Down
12 changes: 6 additions & 6 deletions src/service/workflow-result-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -24,15 +24,15 @@ 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;
});
return data;
}
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;
});
Expand All @@ -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 +
Expand All @@ -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;
});
Expand Down Expand Up @@ -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}`);
}
}
4 changes: 2 additions & 2 deletions src/service/workflow-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 6cc90ab

Please sign in to comment.