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
422f0ca4
Commit
422f0ca4
authored
Apr 12, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[GRAPH] Sorting the nodes.
parent
3d6fbdb3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
9 deletions
+14
-9
Facet.hs
src/Gargantext/Database/Facet.hs
+4
-4
Flow.hs
src/Gargantext/Database/Flow.hs
+1
-1
API.hs
src/Gargantext/Viz/Graph/API.hs
+9
-4
No files found.
src/Gargantext/Database/Facet.hs
View file @
422f0ca4
...
...
@@ -254,10 +254,10 @@ viewDocuments :: CorpusId -> Trash -> NodeTypeId -> Query FacetDocRead
viewDocuments
cId
t
ntId
=
proc
()
->
do
n
<-
queryNodeTable
-<
()
nn
<-
queryNodeNodeTable
-<
()
restrict
-<
_node_id
n
.==
nn_node2_id
nn
restrict
-<
nn_node1_id
nn
.==
(
pgNodeId
cId
)
restrict
-<
_node_typename
n
.==
(
pgInt4
ntId
)
restrict
-<
nn_delete
nn
.==
(
pgBool
t
)
restrict
-<
_node_id
n
.==
nn_node2_id
nn
restrict
-<
nn_node1_id
nn
.==
(
pgNodeId
cId
)
restrict
-<
_node_typename
n
.==
(
pgInt4
ntId
)
restrict
-<
nn_delete
nn
.==
(
pgBool
t
)
returnA
-<
FacetDoc
(
_node_id
n
)
(
_node_date
n
)
(
_node_name
n
)
(
_node_hyperdata
n
)
(
nn_favorite
nn
)
(
pgInt4
1
)
...
...
src/Gargantext/Database/Flow.hs
View file @
422f0ca4
...
...
@@ -164,7 +164,7 @@ flowCorpusUser l userName corpusName ctype ids = do
--}
-- User Dashboard Flow
--
_ <- mkDashboard userCorpusId userId
_
<-
mkDashboard
userCorpusId
userId
-- Annuaire Flow
-- _ <- mkAnnuaire rootUserId userId
...
...
src/Gargantext/Viz/Graph/API.hs
View file @
422f0ca4
...
...
@@ -22,16 +22,17 @@ Portability : POSIX
module
Gargantext.Viz.Graph.API
where
import
Control.Lens
(
set
)
import
Data.List
(
sortOn
)
import
Control.Lens
(
set
,
view
)
import
Control.Monad.IO.Class
(
liftIO
)
import
Gargantext.API.Ngrams.Tools
import
Gargantext.API.Types
import
Gargantext.Core.Types.Main
import
Gargantext.Database.Metrics.NgramsByNode
(
getNodesByNgramsOnlyUser
)
import
Gargantext.Database.Schema.Ngrams
import
Gargantext.Database.Schema.Node
(
getNode
)
import
Gargantext.Database.Schema.Node
(
getNode
)
import
Gargantext.Database.Schema.Node
(
defaultList
)
import
Gargantext.Database.Types.Node
-- (GraphId, ListId, CorpusId, NodeId)
import
Gargantext.Database.Types.Node
hiding
(
node_id
)
-- (GraphId, ListId, CorpusId, NodeId)
import
Gargantext.Prelude
import
Gargantext.Viz.Graph
import
Gargantext.Viz.Graph.Tools
-- (cooc2graph)
...
...
@@ -72,7 +73,11 @@ getGraph nId = do
<$>
groupNodesByNgrams
ngs
<$>
getNodesByNgramsOnlyUser
cId
NgramsTerms
(
Map
.
keys
ngs
)
liftIO
$
set
graph_metadata
(
Just
metadata
)
<$>
cooc2graph
myCooc
graph
<-
liftIO
$
cooc2graph
myCooc
pure
$
set
graph_metadata
(
Just
metadata
)
$
set
graph_nodes
(
sortOn
node_id
$
view
graph_nodes
graph
)
graph
postGraph
::
NodeId
->
GargServer
(
Post
'[
J
SON
]
[
NodeId
])
...
...
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