Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
139
Issues
139
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
purescript-gargantext
Commits
2ab7f05b
Verified
Commit
2ab7f05b
authored
Jan 21, 2023
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[graph explorer] [WIP] attempts to fixes for graph snapshot
parent
6adf6f7e
Pipeline
#3599
failed with stage
in 0 seconds
Changes
6
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
16 deletions
+17
-16
GraphTypes.purs
src/Gargantext/Components/GraphExplorer/GraphTypes.purs
+5
-4
Layout.purs
src/Gargantext/Components/GraphExplorer/Layout.purs
+1
-1
Utils.purs
src/Gargantext/Components/GraphExplorer/Utils.purs
+1
-1
GraphQL.purs
src/Gargantext/Components/GraphQL.purs
+4
-4
Context.purs
src/Gargantext/Components/GraphQL/Context.purs
+1
-1
Endpoints.purs
src/Gargantext/Components/GraphQL/Endpoints.purs
+5
-5
No files found.
src/Gargantext/Components/GraphExplorer/GraphTypes.purs
View file @
2ab7f05b
...
...
@@ -80,6 +80,7 @@ instance JSON.WriteForeign Node where
newtype Edge = Edge {
confluence :: Number
, hidden :: Maybe Boolean
, id_ :: String
, source :: String
, target :: String
...
...
src/Gargantext/Components/GraphExplorer/Layout.purs
View file @
2ab7f05b
...
...
@@ -265,7 +265,7 @@ graphViewCpt = R.memo' $ here.component "graphView" cpt where
-- todo Cache this?
R.useEffect' $ do
here.log2 "[graphView] transformedGraph" $ transformGraph graph' transformParams
--
here.log2 "[graphView] transformedGraph" $ transformGraph graph' transformParams
--let louvain = Louvain.louvain unit in
--let cluster = Louvain.init louvain (SigmaxT.louvainNodes graph') (SigmaxT.louvainEdges graph') in
...
...
src/Gargantext/Components/GraphExplorer/Utils.purs
View file @
2ab7f05b
...
...
@@ -25,7 +25,7 @@ import Gargantext.Utils.Lens as GUL
import Gargantext.Utils.Seq as GUS
stEdgeToGET :: Record ST.Edge -> GEGT.Edge
stEdgeToGET { _original
} = _original
stEdgeToGET { _original
: GEGT.Edge original, hidden } = GEGT.Edge $ original { hidden = Just hidden }
stNodeToGET :: Record ST.Node -> GEGT.Node
stNodeToGET { id, label, x, y, _original: GEGT.Node { attributes, size, type_ } } = GEGT.Node {
...
...
src/Gargantext/Components/GraphQL.purs
View file @
2ab7f05b
...
...
@@ -72,16 +72,16 @@ queryGql session name q = do
-- Schema
type Schema
= {
imt_schools :: {} ==> Array GQLIMT.School
= {
annuaire_contacts :: { contact_id :: Int } ==> Array AnnuaireContact
, contexts :: { context_id :: Int, node_id :: Int } ==> Array GQLCTX.NodeContext
, contexts_for_ngrams :: { corpus_id :: Int, ngrams_ids :: Array Int } ==> Array GQLCTX.Context
,
nodes :: { node_id :: Int } ==> Array Node
,
imt_schools :: {} ==> Array GQLIMT.School
, node_parent :: { node_id :: Int, parent_type :: String } ==> Array Node -- TODO: parent_type :: NodeType
, nodes :: { node_id :: Int } ==> Array Node
, user_infos :: { user_id :: Int } ==> Array UserInfo
, users :: { user_id :: Int } ==> Array User
, tree :: { root_id :: Int } ==> TreeFirstLevel
, annuaire_contacts :: { contact_id :: Int } ==> Array AnnuaireContact
, team :: { team_node_id :: Int } ==> Team
, tree :: { root_id :: Int } ==> TreeFirstLevel
}
type Mutation
...
...
src/Gargantext/Components/GraphQL/Context.purs
View file @
2ab7f05b
...
...
@@ -86,7 +86,7 @@ nodeContextQuery
type ContextsForNgramsQuery
= { contexts_for_ngrams :: Args
{ corpus_id :: Var "corpus_id" Int
, ngrams_ids :: Var "ngrams_ids" (Array Int)}
, ngrams_ids :: Var "ngrams_ids" (Array Int)
}
{ c_id :: Unit
, c_name :: Unit
, c_typename :: Unit
...
...
src/Gargantext/Components/GraphQL/Endpoints.purs
View file @
2ab7f05b
...
...
@@ -108,11 +108,11 @@ getNodeContext session context_id node_id = do
Nothing -> pure $ Left $ CustomError "no node context found"
Just context -> pure $ Right context -- TODO: error handling
getContextsForNgrams :: Session -> Int -> Array Int -> AffRESTError (Array GQLCTX.Context)
getContextsForNgrams session corpus_id ngrams_ids = do
{ contexts_for_ngrams } <- queryGql session "get contexts for ngrams" $
GQLCTX.contextsForNgramsQuery `withVars` { corpus_id, ngrams_ids }
pure $ Right contexts_for_ngrams
--
getContextsForNgrams :: Session -> Int -> Array Int -> AffRESTError (Array GQLCTX.Context)
--
getContextsForNgrams session corpus_id ngrams_ids = do
--
{ contexts_for_ngrams } <- queryGql session "get contexts for ngrams" $
--
GQLCTX.contextsForNgramsQuery `withVars` { corpus_id, ngrams_ids }
--
pure $ Right contexts_for_ngrams
updateNodeContextCategory :: Session -> Int -> Int -> Int -> AffRESTError Int
updateNodeContextCategory session context_id node_id category = do
...
...
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