Skip to content

Commit

Permalink
Merge pull request #300 from rootcodelabs/refactoring-fixes
Browse files Browse the repository at this point in the history
training sessions fix
  • Loading branch information
pamodaDilranga committed Sep 12, 2024
2 parents 80d4578 + 7312c14 commit 6b70c21
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions GUI/src/components/molecules/TrainingSessionCard/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useTranslation } from 'react-i18next';
import ProgressBar from 'components/ProgressBar';
import { Card, Label } from 'components';
import { TrainingSessionsStatuses } from 'enums/dataModelsEnums';

type TrainingSessionCardProps = {
modelName: string;
Expand Down Expand Up @@ -35,14 +36,14 @@ const TrainingSessionCard: React.FC<TrainingSessionCardProps> = ({
<Label type="success">{version}</Label>
{platform && <Label type="success">{platform}</Label>}{' '}
{maturity && <Label type="success">{maturity}</Label>}
{status === 'failed' && <Label type="error">{t('global.failed')}</Label>}
{status === TrainingSessionsStatuses.TRAINING_FAILED_STATUS && <Label type="error">{t('global.failed')}</Label>}
</div>
</div>
}
>
<div>
{(status==='failed' || status==='deployed') && progress===100 ? (
<div className={`text-center ${status==="failed"?'error':''}`}>
{(status===TrainingSessionsStatuses.TRAINING_FAILED_STATUS || status===TrainingSessionsStatuses.TRAINING_SUCCESS_STATUS) && progress===100 ? (
<div className={`text-center ${status===TrainingSessionsStatuses.TRAINING_FAILED_STATUS?'error':''}`}>
{trainingMessage}
</div>
) : (
Expand Down

0 comments on commit 6b70c21

Please sign in to comment.