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
fed00f24
Commit
fed00f24
authored
Sep 15, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] #205 GraphExplorer recomputing (needs refactoring TODO)
parent
b40b708a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
API.hs
src/Gargantext/Core/Viz/Graph/API.hs
+8
-7
No files found.
src/Gargantext/Core/Viz/Graph/API.hs
View file @
fed00f24
...
...
@@ -84,7 +84,7 @@ graphAPI u n = getGraph u n
getGraph
::
UserId
->
NodeId
->
GargNoServer
HyperdataGraphAPI
getGraph
_uId
nId
=
do
nodeGraph
<-
getNodeWith
nId
(
Proxy
::
Proxy
HyperdataGraph
)
let
graph
=
nodeGraph
^.
node_hyperdata
.
hyperdataGraph
let
graph
=
nodeGraph
^.
node_hyperdata
.
hyperdataGraph
let
camera
=
nodeGraph
^.
node_hyperdata
.
hyperdataCamera
repo
<-
getRepo
...
...
@@ -100,7 +100,8 @@ getGraph _uId nId = do
mt
<-
defaultGraphMetadata
cId
"Title"
repo
let
graph''
=
set
graph_metadata
(
Just
mt
)
graph'
let
hg
=
HyperdataGraphAPI
graph''
camera
_
<-
updateHyperdata
nId
hg
-- _ <- updateHyperdata nId hg
_
<-
updateHyperdata
nId
(
HyperdataGraph
(
Just
graph''
)
camera
)
pure
$
trace
"[G.V.G.API] Graph empty, computing"
hg
Just
graph'
->
pure
$
trace
"[G.V.G.API] Graph exists, returning"
$
...
...
@@ -110,10 +111,10 @@ getGraph _uId nId = do
recomputeGraph
::
UserId
->
NodeId
->
Distance
->
GargNoServer
Graph
recomputeGraph
_uId
nId
d
=
do
nodeGraph
<-
getNodeWith
nId
(
Proxy
::
Proxy
HyperdataGraph
)
let
graph
=
nodeGraph
^.
node_hyperdata
.
hyperdataGraph
let
graph
=
nodeGraph
^.
node_hyperdata
.
hyperdataGraph
let
camera
=
nodeGraph
^.
node_hyperdata
.
hyperdataCamera
let
graphMetadata
=
graph
^?
_Just
.
graph_metadata
.
_Just
let
listVersion
=
graph
^?
_Just
.
graph_metadata
.
_Just
.
gm_list
.
lfg_version
let
listVersion
=
graph
^?
_Just
.
graph_metadata
.
_Just
.
gm_list
.
lfg_version
repo
<-
getRepo
let
v
=
repo
^.
r_version
...
...
@@ -223,11 +224,11 @@ type GraphVersionsAPI = Summary "Graph versions"
graphVersionsAPI
::
UserId
->
NodeId
->
GargServer
GraphVersionsAPI
graphVersionsAPI
u
n
=
graphVersions
u
n
graphVersions
n
:<|>
recomputeVersions
u
n
graphVersions
::
UserId
->
NodeId
->
GargNoServer
GraphVersions
graphVersions
_uId
nId
=
do
graphVersions
::
NodeId
->
GargNoServer
GraphVersions
graphVersions
nId
=
do
nodeGraph
<-
getNodeWith
nId
(
Proxy
::
Proxy
HyperdataGraph
)
let
graph
=
nodeGraph
^.
node_hyperdata
.
hyperdataGraph
let
listVersion
=
graph
^?
_Just
...
...
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