From 7fe49d170d29fbbcea17407e42b12f3eb644bdcf Mon Sep 17 00:00:00 2001 From: yingfeng Date: Sat, 14 Oct 2023 13:00:54 -0400 Subject: [PATCH] AMP-2990/AMP-3006: - fix href links in Dashboard, PFile output, eval output - fix source link in mediaElement - rewrite WFservice API call get get media/output --- src/components/dashboard/DashboardTable.vue | 15 ++++++----- src/components/entity/EntityList.vue | 3 ++- src/components/entity/OutputFile.vue | 3 ++- .../evaluation/TestResultsVisualiz.vue | 7 ++--- src/service/workflow-result-service.js | 27 ++++++++++++++----- 5 files changed, 35 insertions(+), 20 deletions(-) diff --git a/src/components/dashboard/DashboardTable.vue b/src/components/dashboard/DashboardTable.vue index 7fa898e9..f8c3daea 100644 --- a/src/components/dashboard/DashboardTable.vue +++ b/src/components/dashboard/DashboardTable.vue @@ -132,9 +132,8 @@ {{ rec.itemName }} {{ rec.primaryfileName }} {{ rec.outputName }} {{ rec.outputLabel }}{{ testResult.workflowResult.workflowStep diff --git a/src/service/workflow-result-service.js b/src/service/workflow-result-service.js index ab41d80d..25401de1 100644 --- a/src/service/workflow-result-service.js +++ b/src/service/workflow-result-service.js @@ -53,13 +53,28 @@ export default class WorkflowResultService extends BaseService { return data; } - getSourceUrl(primaryfileId) { - const url = `${this.API_URL}/primaryfiles/${primaryfileId}/media`; - return url; + async getSourceLink(primaryfileId) { + const url = `/primaryfiles/${primaryfileId}/media`; + var symlink = await super.get_auth(url).then((result) => { + return result.headers['location']; + }); + return symlink; + } + + async getSourceUrl(primaryfileId) { + const url = `/primaryfiles/${primaryfileId}/media`; + var content = await super.get_auth(url).then((result) => { + return result.data; + }); + return content; } - getOutputUrl(id) { - const url = `${this.API_URL}/workflow-results/${id}/output`; - return url; + + async getOutputUrl(id) { + const url = `/workflow-results/${id}/output`; + var content = await super.get_auth(url).then((result) => { + return result.data; + }); + return content; } async deleteWorkflowResult(id) {