From 0be81beb34726f0a55dd6edf4f68a632dc690f54 Mon Sep 17 00:00:00 2001 From: NithyaSanthanam <nithya.s@matriotsolutions.com> Date: Wed, 1 Sep 2021 11:30:42 +0530 Subject: [PATCH] TMSS-940: PiplineId updated, Ordered Table --- .../src/routes/Workflow/qa.reporting.template.js | 11 ++++++++--- .../frontend/tmss_webapp/src/services/task.service.js | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Workflow/qa.reporting.template.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Workflow/qa.reporting.template.js index 68d40a07a63..a37a02a257f 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Workflow/qa.reporting.template.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Workflow/qa.reporting.template.js @@ -29,7 +29,11 @@ const QaReportingTemplate = { let taskDataproducts = _.find(dataproducts.task_blueprints, {'id': task.id}) for(const successor of taskSuccessors) { if(successor.task_type === "pipeline") { - observation.pipeline.push(successor.id); + taskSuccessors.subtasks.map(successorSubtask => { + if(successorSubtask.primary === true){ + observation.pipeline.push(successorSubtask.id); + } + }) } } let taskDP = []; @@ -69,7 +73,8 @@ const QaReportingTemplate = { } let tableBody = '' - for (const observation of observations) { + const sortedObservations = _.orderBy(observations,['startTime'], ['desc']) + for (const observation of sortedObservations) { tableBody = tableBody + ` <tr> <td><a href="https://proxy.lofar.eu/inspect/HTML/${observation.controlId}/index.html">${observation.controlId}</a></td> @@ -128,7 +133,7 @@ const QaReportingTemplate = { <strong>Archiving:</strong> <strong style='display:inline'>Remarks:</strong><p style= "display:inline; position: relative"> Please analyse the validation plots at <a href="https://proxy.lofar.eu/inspect/HTML/">https://proxy.lofar.eu/inspect/HTML/</a> within 24 hours after this notification and submit your - findings using the form at <a href="http://localhost:3000/schedulingunit/${id}/workflow">http://localhost:3000/schedulingunit/${id}/workflow </a>. + findings using the form at <a href="/schedulingunit/${id}/workflow">${window.location.origin}/schedulingunit/${id}/workflow </a>. After this time window has passed, we will assume that your judgement is that the observation was successful and we will complete the actions described above ourselves to support your run.</p> <br/> <p>From the moment the data are made available to you at the LTA you have four weeks to check their quality and to report any problems to the diff --git a/SAS/TMSS/frontend/tmss_webapp/src/services/task.service.js b/SAS/TMSS/frontend/tmss_webapp/src/services/task.service.js index 8635ac5c32e..a557442c79c 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/services/task.service.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/services/task.service.js @@ -147,7 +147,7 @@ const TaskService = { }, getTaskSuccessors: async function(type, id) { try { - const url = type === 'blueprint'? `/api/task_blueprint/${id}/successors`: `/api/task_draft/${id}/successors/`; + const url = type === 'blueprint'? `/api/task_blueprint/${id}/successors/?expand=subtasks`: `/api/task_draft/${id}/successors/`; const response = await axios.get(url); return response.data; } catch (error) { -- GitLab