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
1820d93a1a8c
Commit
1820d93a1a8c
authored
1 year ago
by
Arnaud Vergnet
Browse files
Options
Downloads
Patches
Plain Diff
fix(frontend): fetch all files for all import processes
parent
8da5c45f5f48
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!32
fix(frontend): fetch all files for all import processes
Pipeline
#230032
passed
1 year ago
Stage: install
Stage: lint
Stage: build
Stage: tests
Stage: release
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/src/api/cubicweb.ts
+5
-24
5 additions, 24 deletions
frontend/src/api/cubicweb.ts
with
5 additions
and
24 deletions
frontend/src/api/cubicweb.ts
+
5
−
24
View file @
1820d93a
...
...
@@ -306,7 +306,8 @@
// the state to fetch the TrInfo which leads to this state, and with the TrInfo entity you do have the
// creation_date, the comment and so on
return
(
"
Any X, MAX(VAL_DATE), VAL_RECIPE, VAL_PROJECT, VAL_STATE, ATTR_SHACL_VALID
"
+
"
GROUPBY X, VAL_RECIPE, VAL_PROJECT, VAL_STATE, ATTR_SHACL_VALID
"
+
"
Any X, MAX(VAL_DATE), VAL_RECIPE, VAL_PROJECT, VAL_STATE, ATTR_SHACL_VALID,
"
+
"
DATA.download_url(), LOG.download_url(), SHACL.download_url()
"
+
"
GROUPBY X, VAL_RECIPE, VAL_PROJECT, VAL_STATE, ATTR_SHACL_VALID, DATA, LOG, SHACL
"
+
"
ORDERBY MAX(VAL_DATE) DESC
"
+
"
WHERE X is ImportProcess, X shacl_valid ATTR_SHACL_VALID,
"
+
...
...
@@ -311,5 +312,6 @@
"
ORDERBY MAX(VAL_DATE) DESC
"
+
"
WHERE X is ImportProcess, X shacl_valid ATTR_SHACL_VALID,
"
+
"
X has_output_dataset DATA?, X import_report LOG?, X shacl_report SHACL?,
"
+
getImportRecipePart
(
hasDataService
,
hasRecipe
)
+
getImportProcedurePart
(
hasProject
)
+
"
X in_state S, S name VAL_STATE,
"
+
...
...
@@ -319,7 +321,6 @@
return
async
({
dataServiceEid
,
recipeEid
,
projectEid
})
=>
{
try
{
const
transaction
=
new
Transaction
();
const
params
:
RQLParams
=
{};
if
(
dataServiceEid
)
{
params
[
"
dataservice_eid
"
]
=
dataServiceEid
;
...
...
@@ -330,7 +331,7 @@
if
(
projectEid
)
{
params
[
"
project_eid
"
]
=
projectEid
;
}
const
importProcessList
Query
=
transaction
.
push
(
const
importProcessList
Result
=
await
client
.
execute
(
getRql
(
dataServiceEid
!==
undefined
,
recipeEid
!==
undefined
,
...
...
@@ -338,26 +339,6 @@
),
params
,
);
// TODO fetch files for all import processes
// See https://forge.extranet.logilab.fr/cubicweb/RQL/-/merge_requests/99
const
dataLogQuery
=
transaction
.
push
(
"
Any X, DATA.download_url(), LOG.download_url(), SHACL.download_url() WHERE X eid %(eid)s,
"
+
"
X has_output_dataset DATA?, X import_report LOG?, X shacl_report SHACL?
"
,
{
eid
:
importProcessListQuery
.
ref
().
row
(
0
).
column
(
0
)
},
);
const
result
=
await
client
.
executeTransaction
(
transaction
);
const
importProcessListResult
=
result
.
resolveQuery
(
importProcessListQuery
.
ref
(),
);
const
dataLogListResult
=
result
.
resolveQuery
(
dataLogQuery
.
ref
());
for
(
const
result
of
importProcessListResult
)
{
const
dataLog
=
dataLogListResult
.
find
((
e
)
=>
e
[
0
]
===
result
[
0
]);
if
(
dataLog
!=
undefined
)
{
result
[
6
]
=
dataLog
[
1
];
result
[
7
]
=
dataLog
[
2
];
result
[
8
]
=
dataLog
[
3
];
}
}
return
importProcessListResultSetToObject
(
importProcessListResult
);
}
catch
(
e
)
{
if
(
e
&&
typeof
e
===
"
object
"
&&
"
title
"
in
e
)
{
...
...
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