Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Przemyslaw Kaminski
haskell-gargantext
Commits
5f603a21
Commit
5f603a21
authored
Sep 14, 2021
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] Graph Screenshot loader
parent
9f076275
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
8 deletions
+18
-8
API.hs
src/Gargantext/Core/Viz/Graph/API.hs
+15
-8
Node.hs
src/Gargantext/Database/Query/Table/Node.hs
+3
-0
No files found.
src/Gargantext/Core/Viz/Graph/API.hs
View file @
5f603a21
...
...
@@ -239,11 +239,11 @@ type GraphVersionsAPI = Summary "Graph versions"
graphVersionsAPI
::
UserId
->
NodeId
->
GargServer
GraphVersionsAPI
graphVersionsAPI
u
n
=
graphVersions
n
graphVersions
0
n
:<|>
recomputeVersions
u
n
graphVersions
::
NodeId
->
GargNoServer
GraphVersions
graphVersions
nId
=
do
graphVersions
::
Int
->
NodeId
->
GargNoServer
GraphVersions
graphVersions
n
n
Id
=
do
nodeGraph
<-
getNodeWith
nId
(
Proxy
::
Proxy
HyperdataGraph
)
let
graph
=
nodeGraph
...
...
@@ -261,12 +261,19 @@ graphVersions nId = do
identity
$
nodeGraph
^.
node_parent_id
listId
<-
defaultList
cId
repo
<-
getRepo'
[
listId
]
let
v
=
repo
^.
unNodeStory
.
at
listId
.
_Just
.
a_version
maybeListId
<-
defaultListMaybe
cId
case
maybeListId
of
Nothing
->
if
n
<=
2
then
graphVersions
(
n
+
1
)
cId
else
panic
"[G.V.G.API] list not found after iterations"
Just
listId
->
do
repo
<-
getRepo'
[
listId
]
let
v
=
repo
^.
unNodeStory
.
at
listId
.
_Just
.
a_version
printDebug
"graphVersions"
v
pure
$
GraphVersions
{
gv_graph
=
listVersion
,
gv_repo
=
v
}
pure
$
GraphVersions
{
gv_graph
=
listVersion
,
gv_repo
=
v
}
recomputeVersions
::
UserId
->
NodeId
->
GargNoServer
Graph
recomputeVersions
uId
nId
=
recomputeGraph
uId
nId
Nothing
...
...
src/Gargantext/Database/Query/Table/Node.hs
View file @
5f603a21
...
...
@@ -336,6 +336,9 @@ defaultList :: (HasNodeError err, HasDBid NodeType) => CorpusId -> Cmd err ListI
defaultList
cId
=
maybe
(
nodeError
NoListFound
)
(
pure
.
view
node_id
)
.
headMay
=<<
getListsWithParentId
cId
defaultListMaybe
::
(
HasNodeError
err
,
HasDBid
NodeType
)
=>
CorpusId
->
Cmd
err
(
Maybe
NodeId
)
defaultListMaybe
cId
=
headMay
<$>
map
(
view
node_id
)
<$>
getListsWithParentId
cId
getListsWithParentId
::
HasDBid
NodeType
=>
NodeId
->
Cmd
err
[
Node
HyperdataList
]
getListsWithParentId
n
=
runOpaQuery
$
selectNodesWith'
n
(
Just
NodeList
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment