Skip to content

Commit

Permalink
Show state estimation logs (#2509)
Browse files Browse the repository at this point in the history
Signed-off-by: Franck LECUYER <[email protected]>
  • Loading branch information
FranckLecuyer authored Jan 23, 2025
1 parent 59b4991 commit 50306c1
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
stateEstimationQualityCriterionColumnsDefinition,
stateEstimationQualityPerRegionColumnsDefinition,
} from './state-estimation-result-utils';
import { ComputationReportViewer } from '../common/computation-report-viewer';

const styles = {
flexWrapper: {
Expand Down Expand Up @@ -102,13 +103,25 @@ export const StateEstimationResultTab: FunctionComponent<StateEstimationTabProps
};
}, [stateEstimationStatus, stateEstimationResult, intl]);

const renderReportViewer = () => {
return (
<GlassPane active={isLoadingResult}>
{(stateEstimationStatus === RunningStatus.SUCCEED ||
stateEstimationStatus === RunningStatus.FAILED) && (
<ComputationReportViewer reportType={ComputingType.STATE_ESTIMATION} />
)}
</GlassPane>
);
};

return (
<>
<Box sx={styles.flexWrapper}>
<Tabs value={tabIndex} onChange={handleTabChange} sx={styles.flexElement}>
<Tab label={<FormattedMessage id={'StateEstimationStatusResults'} />} />
<Tab label={<FormattedMessage id={'StateEstimationQualityCriterionResults'} />} />
<Tab label={<FormattedMessage id={'StateEstimationQualityPerRegionResults'} />} />
<Tab label={<FormattedMessage id={'ComputationResultsLogs'} />} />
</Tabs>
<Box sx={styles.emptySpace}></Box>
</Box>
Expand All @@ -134,6 +147,7 @@ export const StateEstimationResultTab: FunctionComponent<StateEstimationTabProps
/>
</GlassPane>
)}
{tabIndex === 3 && renderReportViewer()}
</>
);
};

0 comments on commit 50306c1

Please sign in to comment.