Skip to content

Commit

Permalink
CORE-2002 Fix AnalysisRunTime display for Tapis jobs
Browse files Browse the repository at this point in the history
This will also fix the duration display for analyses stories,
since they all share a job history mock,
with a Tapis job in the first step.
  • Loading branch information
psarando committed Aug 10, 2024
1 parent e13b9f8 commit 49f7100
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/analyses/useAnalysisRunTime.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ function useAnalysisRunTime(
// Make sure we're looking at the correct step
// (e.g. step_type === "Interactive" or step_number === 1)
const step = resp?.steps?.find(stepFilterFn);
// Find the first Running update
// Find the first Running update, ignoring case for Tapis jobs.
const runningUpdate = step?.updates?.find(
(update) => update.status === analysisStatus.RUNNING
(update) =>
update.status.toUpperCase() ===
analysisStatus.RUNNING.toUpperCase()
);
// Record the timestamp
setRunningStart(parseInt(runningUpdate?.timestamp || 0));
Expand Down

0 comments on commit 49f7100

Please sign in to comment.