Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Fix bug where undefined is shown on UI for estimatedMins in case of ingestion data missing #301

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions public/pages/DetectorResults/containers/AnomalyResults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,13 @@ export function AnomalyResults(props: AnomalyResultsProps) {
};

const getInitProgressMessage = () => {
return detector && isDetectorInitializing && detector.initProgress
? `The detector needs ${detector.initProgress.estimatedMinutesLeft} minutes for initializing. If your data stream is not continuous, it may take even longer. `
return detector &&
isDetectorInitializing &&
get(detector, 'initProgress.estimatedMinutesLeft')
? `The detector needs ${get(
detector,
'initProgress.estimatedMinutesLeft'
)} minutes for initializing. If your data stream is not continuous, it may take even longer. `
: '';
};

Expand Down