Skip to content
Snippets Groups Projects
Commit 1c8318f9e53d authored by Olivier Giorgis's avatar Olivier Giorgis
Browse files

feat: add dataservice name on recipe cards

parent 0f3e807f14b3
No related branches found
No related tags found
1 merge request!22Export data into SPARQL endpoint
Pipeline #228957 passed
......@@ -193,7 +193,7 @@
});
const eidRef = insertQuery.ref().row(0).column(0);
transaction.push(setDataServiceRql, {
dataservice: data.dataservice,
dataservice: data.dataservice.eid,
eid: eidRef,
});
transaction.push(setProjectRql, {
......@@ -212,8 +212,8 @@
"X virtuoso_password ATTR_VIRTUOSO_PASSWORD, X activated ATTR_ACTIVATED, X ontology_file REL_ONTOLOGY?, X shacl_files REL_SHACL?";
const recipeListRql =
"Any X, ATTR_NAME, ATTR_GRAPH_URI, ATTR_PROCESS_TYPE ,REL_DATASERVICE " +
"WHERE X is ImportRecipe, X name ATTR_NAME, X graph_uri ATTR_GRAPH_URI, X process_type ATTR_PROCESS_TYPE, X dataservice REL_DATASERVICE, O import_recipes X, O eid %(eid)s";
"Any X, ATTR_NAME, ATTR_GRAPH_URI, ATTR_PROCESS_TYPE ,REL_DATASERVICE, REL_DATASERVICE_NAME " +
"WHERE X is ImportRecipe, X name ATTR_NAME, X graph_uri ATTR_GRAPH_URI, X process_type ATTR_PROCESS_TYPE, X dataservice REL_DATASERVICE, REL_DATASERVICE name REL_DATASERVICE_NAME, O import_recipes X, O eid %(eid)s";
return async (eid: number) => {
try {
......@@ -235,7 +235,7 @@
name: r[1],
process_type: r[2],
graph_uri: r[3],
dataservice: r[4],
dataservice: { eid: r[4], name: r[5] },
}) as Recipe,
);
......
......@@ -92,6 +92,7 @@
key={i}
name={d.name}
processType={d.process_type}
dataserviceName={d.dataservice.name}
onOpen={() => {
if (selectedRecipeEid !== d.eid) {
setSelectedRecipeEid(d.eid);
......
......@@ -104,6 +104,6 @@
render={({ field, fieldState: { error } }) => (
<Autocomplete
disabled={saving}
{...field}
inputValue={data?.find((d) => d.eid === field.value)?.name}
{...field.value}
inputValue={data?.find((d) => d === field.value)?.name}
onChange={(_, newValue) => field.onChange(newValue)}
......@@ -109,5 +109,5 @@
onChange={(_, newValue) => field.onChange(newValue)}
options={data ? data.map((d) => d.eid) : []}
options={data ? data : []}
loading={loading}
renderInput={(params) => (
<TextField
......@@ -123,7 +123,7 @@
)}
getOptionLabel={
data
? (option) => data.find((d) => d.eid === option)?.name ?? ""
? (option) => data.find((d) => d === option)?.name ?? ""
: () => ""
}
/>
......
......@@ -14,6 +14,7 @@
interface RecipeCardProps {
name: string;
processType: "default" | "default-dryrun";
dataserviceName: string;
lastProcessDate?: Date;
lastProcessSuccess?: boolean;
selected: boolean;
......@@ -26,6 +27,7 @@
lastProcessDate,
lastProcessSuccess,
processType,
dataserviceName,
selected,
onOpen,
onDelete,
......@@ -73,6 +75,7 @@
</>
) : null}
<Typography variant="body2">Process type: {processType}</Typography>
<Typography variant="body2">Data Service: {dataserviceName}</Typography>
</CardContent>
</BaseCard>
);
......
......@@ -28,7 +28,7 @@
export type Recipe = {
eid: number;
name: string;
dataservice: number;
dataservice: { eid: number; name: string };
graph_uri: string;
process_type: "default" | "default-dryrun";
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment