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
69695fe9
Commit
69695fe9
authored
Nov 22, 2021
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[graph] fix default list id for graph
parent
5a8e197b
Changes
2
Show 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 @
69695fe9
...
...
@@ -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_id
mcId
<-
getClosestParentIdByType
nId
NodeCorpus
let
cId
=
maybe
(
panic
"[G.V.G.API] Node has no parent"
)
identity
mcId
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 @
69695fe9
...
...
@@ -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