Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Rodolf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cubicweb
cubes
Rodolf
Commits
0f3e807f14b3
Commit
0f3e807f14b3
authored
1 year ago
by
Olivier Giorgis
Browse files
Options
Downloads
Patches
Plain Diff
feat: add graph_uri field
parent
f62131463bda
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!22
Export data into SPARQL endpoint
Pipeline
#228918
passed
1 year ago
Stage: install
Stage: lint
Stage: build
Stage: tests
Stage: release
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
frontend/src/api/cubicweb.ts
+6
-4
6 additions, 4 deletions
frontend/src/api/cubicweb.ts
frontend/src/components/RecipeModal.tsx
+16
-0
16 additions, 0 deletions
frontend/src/components/RecipeModal.tsx
frontend/src/types.ts
+1
-0
1 addition, 0 deletions
frontend/src/types.ts
with
23 additions
and
4 deletions
frontend/src/api/cubicweb.ts
+
6
−
4
View file @
0f3e807f
...
...
@@ -179,7 +179,7 @@
export
function
useApiCreateRecipe
()
{
const
client
=
useClient
();
const
insertRql
=
"
INSERT ImportRecipe X: X name %(name)s, X process_type %(process_type)s
"
;
"
INSERT ImportRecipe X: X name %(name)s, X
graph_uri %(graph_uri)s, X
process_type %(process_type)s
"
;
const
setDataServiceRql
=
"
SET X dataservice %(dataservice)s WHERE X eid %(eid)s
"
;
const
setProjectRql
=
...
...
@@ -188,6 +188,7 @@
const
transaction
=
new
Transaction
();
const
insertQuery
=
transaction
.
push
(
insertRql
,
{
name
:
data
.
name
,
graph_uri
:
data
.
graph_uri
,
process_type
:
data
.
process_type
,
});
const
eidRef
=
insertQuery
.
ref
().
row
(
0
).
column
(
0
);
...
...
@@ -211,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_PROCESS_TYPE ,
REL_DATASERVICE
"
+
"
WHERE X is ImportRecipe, X name ATTR_NAME, 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
"
+
"
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
"
;
return
async
(
eid
:
number
)
=>
{
try
{
...
...
@@ -233,7 +234,8 @@
eid
:
r
[
0
],
name
:
r
[
1
],
process_type
:
r
[
2
],
dataservice
:
r
[
3
],
graph_uri
:
r
[
3
],
dataservice
:
r
[
4
],
})
as
Recipe
,
);
...
...
This diff is collapsed.
Click to expand it.
frontend/src/components/RecipeModal.tsx
+
16
−
0
View file @
0f3e807f
...
...
@@ -130,6 +130,22 @@
)
}
/>
<
Controller
name
=
"graph_uri"
control
=
{
control
}
rules
=
{
{
required
:
true
}
}
render
=
{
({
field
,
fieldState
:
{
error
}
})
=>
(
<
TextField
label
=
"Graph Uri"
disabled
=
{
saving
}
{
...
field
}
error
=
{
error
!==
undefined
}
helperText
=
{
error
?.
type
===
"
required
"
?
"
Champ requis
"
:
error
?.
message
}
/>
)
}
/>
<
Controller
name
=
"process_type"
control
=
{
control
}
rules
=
{
{
required
:
true
}
}
...
...
This diff is collapsed.
Click to expand it.
frontend/src/types.ts
+
1
−
0
View file @
0f3e807f
...
...
@@ -29,6 +29,7 @@
eid
:
number
;
name
:
string
;
dataservice
:
number
;
graph_uri
:
string
;
process_type
:
"
default
"
|
"
default-dryrun
"
;
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment