Skip to content

Commit

Permalink
progressOutput
Browse files Browse the repository at this point in the history
  • Loading branch information
walterra committed May 7, 2024
1 parent 4acad8f commit 958cf18
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ export const ProgressControls: FC<PropsWithChildren<ProgressControlProps>> = (pr
runAnalysisDisabled = false,
} = props;

const progressOutput = Math.round(progress * 100);

const { euiTheme } = useEuiTheme();
const runningProgressBarStyles = useAnimatedProgressBarBackground(euiTheme.colors.success);
const analysisCompleteStyle = { display: 'none' };
Expand Down Expand Up @@ -147,7 +149,7 @@ export const ProgressControls: FC<PropsWithChildren<ProgressControlProps>> = (pr
data-test-subj="aiopsProgressTitleMessage"
id="xpack.aiops.progressTitle"
defaultMessage="Progress: {progress}% — {progressMessage}"
values={{ progress: Math.round(progress * 100), progressMessage }}
values={{ progress: progressOutput, progressMessage }}
/>
</EuiText>
</EuiFlexItem>
Expand All @@ -156,7 +158,7 @@ export const ProgressControls: FC<PropsWithChildren<ProgressControlProps>> = (pr
aria-label={i18n.translate('xpack.aiops.progressAriaLabel', {
defaultMessage: 'Progress',
})}
value={Math.round(progress * 100)}
value={progressOutput}
max={100}
size="m"
/>
Expand Down

0 comments on commit 958cf18

Please sign in to comment.