Skip to content

Commit

Permalink
fix: Make cube checker work with data source
Browse files Browse the repository at this point in the history
  • Loading branch information
ptbrowne committed Sep 20, 2022
1 parent 61e99bc commit cbc8849
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion app/pages/_cube-checker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ import StreamClient from "sparql-http-client";

import { ContentLayout } from "@/components/layout";
import { DataSource } from "@/configurator";
import { DEFAULT_DATA_SOURCE, parseDataSource } from "@/domain/datasource";
import {
DEFAULT_DATA_SOURCE,
parseDataSource,
sourceToLabel,
useDataSourceState,
} from "@/domain/datasource";
import { SOURCES_BY_LABEL } from "@/domain/datasource/constants";
import { fromStream } from "@/rdf/sparql-client";

Expand Down Expand Up @@ -151,6 +156,7 @@ const checks: Check[] = [
];

const Page: NextPage<PageProps> = ({ checks, cubeIri }) => {
const [datasource] = useDataSourceState();
return (
<>
<ContentLayout>
Expand Down Expand Up @@ -180,6 +186,11 @@ const Page: NextPage<PageProps> = ({ checks, cubeIri }) => {
}),
}}
/>
<input
type="hidden"
name="dataSource"
value={sourceToLabel(datasource)}
/>
<Button type="submit" variant="contained" size="large">
Check
</Button>
Expand Down

0 comments on commit cbc8849

Please sign in to comment.