Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
199
Issues
199
List
Board
Labels
Milestones
Merge Requests
12
Merge Requests
12
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
gargantext
haskell-gargantext
Commits
8bdd300b
Commit
8bdd300b
authored
Nov 22, 2021
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-fix-node-children' of
ssh://delanoe.org/haskell-gargantext
into dev-wikidata
parents
db3fa501
69695fe9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
9 deletions
+7
-9
API.hs
src/Gargantext/Core/Viz/Graph/API.hs
+7
-8
Node.hs
src/Gargantext/Database/Query/Table/Node.hs
+0
-1
No files found.
src/Gargantext/Core/Viz/Graph/API.hs
View file @
8bdd300b
...
...
@@ -90,10 +90,11 @@ getGraph _uId nId = do
let
graph
=
nodeGraph
^.
node_hyperdata
.
hyperdataGraph
camera
=
nodeGraph
^.
node_hyperdata
.
hyperdataCamera
cId
=
maybe
(
panic
"[G.V.G.API] Node has no parent"
)
identity
$
nodeGraph
^.
node_parent_i
d
mcId
<-
getClosestParentIdByType
nId
NodeCorpus
let
cId
=
maybe
(
panic
"[G.V.G.API] Node has no parent"
)
identity
mcI
d
printDebug
"[getGraph] getting list for cId"
cId
listId
<-
defaultList
cId
repo
<-
getRepo'
[
listId
]
...
...
@@ -130,15 +131,13 @@ recomputeGraph _uId nId maybeDistance = do
graphMetric
=
case
maybeDistance
of
Nothing
->
graph
^?
_Just
.
graph_metadata
.
_Just
.
gm_metric
_
->
maybeDistance
let
cId
=
maybe
(
panic
"[G.C.V.G.API.recomputeGraph] Node has no parent"
)
identity
$
nodeGraph
^.
node_parent_id
similarity
=
case
graphMetric
of
Nothing
->
withMetric
Order1
Just
m
->
withMetric
m
mcId
<-
getClosestParentIdByType
nId
NodeCorpus
let
cId
=
maybe
(
panic
"[G.V.G.API] Node has no parent"
)
identity
mcId
listId
<-
defaultList
cId
repo
<-
getRepo'
[
listId
]
let
v
=
repo
^.
unNodeStory
.
at
listId
.
_Just
.
a_version
...
...
src/Gargantext/Database/Query/Table/Node.hs
View file @
8bdd300b
...
...
@@ -386,7 +386,6 @@ defaultList 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