From 9c26d17f58d82d53ff9610461ecd366062301191 Mon Sep 17 00:00:00 2001 From: alilahrime Date: Wed, 17 Aug 2022 10:05:39 -0400 Subject: [PATCH] fix(gwas-ui): fix bugs & pr feedback --- src/Analysis/AnalysisApp.jsx | 4 +-- src/Analysis/GWASUIApp/GWASWorkflowList.jsx | 1 - .../shared/CustomDichotomousSelect.jsx | 2 +- .../GWASWizard/shared/GWASFormSubmit.jsx | 3 +- src/Analysis/GWASWizard/shared/GWASJob.jsx | 31 ++++++++++--------- .../GWASWizard/shared/WorkflowParameters.jsx | 2 +- src/Analysis/GWASWizard/shared/constants.js | 10 ++++++ .../wizardEndpoints/cohortMiddlewareApi.js | 2 +- src/Discovery/Discovery.css | 2 +- 9 files changed, 34 insertions(+), 23 deletions(-) diff --git a/src/Analysis/AnalysisApp.jsx b/src/Analysis/AnalysisApp.jsx index 51b8e13c7e..f0a3e71334 100644 --- a/src/Analysis/AnalysisApp.jsx +++ b/src/Analysis/AnalysisApp.jsx @@ -225,8 +225,8 @@ class AnalysisApp extends React.Component { ? (
{this.isJobRunning() ? : null} - {job && job.status === 'Completed' ?

Job Completed

: null} - {job && job.status === 'Failed' ?

Job Failed

: null} + {job?.status === 'Completed' ?

Job Completed

: null} + {job?.status === 'Failed' ?

Job Failed

: null} {results ? results.map((line, i) =>

{line}

) : null}
) diff --git a/src/Analysis/GWASUIApp/GWASWorkflowList.jsx b/src/Analysis/GWASUIApp/GWASWorkflowList.jsx index 6f9df04844..a0ab6e6643 100644 --- a/src/Analysis/GWASUIApp/GWASWorkflowList.jsx +++ b/src/Analysis/GWASUIApp/GWASWorkflowList.jsx @@ -41,7 +41,6 @@ const GWASWorkflowList = () => { )} /> - diff --git a/src/Analysis/GWASWizard/shared/CustomDichotomousSelect.jsx b/src/Analysis/GWASWizard/shared/CustomDichotomousSelect.jsx index a38cd61cbb..9b55931236 100644 --- a/src/Analysis/GWASWizard/shared/CustomDichotomousSelect.jsx +++ b/src/Analysis/GWASWizard/shared/CustomDichotomousSelect.jsx @@ -80,7 +80,7 @@ const CustomDichotomousSelect = ({ width: 300, }} actions={[ - handleCDRemove(cd.uuid)} key='delete' />, + handleCDRemove(d.uuid)} key='delete' />, ]} > { async function handleWorkflowOutput(url) { @@ -37,16 +38,16 @@ const GWASJob = ({ workflow }) => { let buttonText; let buttonClickHandler; - if (phase === 'Succeeded') { + if (phase === gwasStatus.suceeded) { actionUrl = `${gwasWorkflowPath}status/${workflowName}`; buttonText = 'download outputs'; buttonClickHandler = handleWorkflowOutput; - } else if (phase === 'Failed') { + } else if (phase === gwasStatus.failed) { actionUrl = `${gwasWorkflowPath}logs/${workflowName}`; buttonText = 'view logs'; buttonClickHandler = handleWorkflowLogs; } - if (['Succeeded', 'Failed'].includes(phase)) { + if ([gwasStatus.suceeded, gwasStatus.failed].includes(phase)) { actionButtons.unshift(