Merge pull request #8516 from wejendorp/jsonfc-fix

fix: allow partial evaluation of checks in jsonfc factchecker
This commit is contained in:
Fredrik Adelöw
2021-12-22 15:46:15 +01:00
committed by GitHub
4 changed files with 70 additions and 22 deletions
@@ -21,6 +21,7 @@ import { Content, Page, InfoCard } from '@backstage/core-components';
import { CheckResult } from '@backstage/plugin-tech-insights-common';
import { techInsightsApiRef } from '../../api/TechInsightsApi';
import { BackstageTheme } from '@backstage/theme';
import { Alert } from '@material-ui/lab';
const useStyles = makeStyles((theme: BackstageTheme) => ({
contentScorecards: {
@@ -40,6 +41,9 @@ type Checks = {
export const ChecksOverview = ({ checks }: Checks) => {
const classes = useStyles();
const api = useApi(techInsightsApiRef);
if (!checks.length) {
return <Alert severity="warning">No checks have any data yet.</Alert>;
}
const checkRenderType = api.getScorecardsDefinition(
checks[0].check.type,
checks,