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
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
Grégoire Locqueville
purescript-gargantext
Commits
1833bad9
Commit
1833bad9
authored
Mar 13, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev-graph-explorer-save-gexf' into dev-merge
parents
9e975cf6
a051df3e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
GraphExplorer.purs
src/Gargantext/Components/GraphExplorer.purs
+4
-1
Sidebar.purs
src/Gargantext/Components/GraphExplorer/Sidebar.purs
+12
-1
No files found.
src/Gargantext/Components/GraphExplorer.purs
View file @
1833bad9
...
@@ -140,6 +140,7 @@ explorerCpt = R.hooksComponent "G.C.GraphExplorer.explorer" cpt
...
@@ -140,6 +140,7 @@ explorerCpt = R.hooksComponent "G.C.GraphExplorer.explorer" cpt
}
}
, mSidebar mMetaData { frontends
, mSidebar mMetaData { frontends
, graph
, graph
, graphId
, graphVersion
, graphVersion
, removedNodeIds: controls.removedNodeIds
, removedNodeIds: controls.removedNodeIds
, session
, session
...
@@ -171,6 +172,7 @@ explorerCpt = R.hooksComponent "G.C.GraphExplorer.explorer" cpt
...
@@ -171,6 +172,7 @@ explorerCpt = R.hooksComponent "G.C.GraphExplorer.explorer" cpt
mSidebar :: Maybe GET.MetaData
mSidebar :: Maybe GET.MetaData
-> { frontends :: Frontends
-> { frontends :: Frontends
, graph :: SigmaxT.SGraph
, graph :: SigmaxT.SGraph
, graphId :: GraphId
, graphVersion :: R.State Int
, graphVersion :: R.State Int
, removedNodeIds :: R.State SigmaxT.NodeIds
, removedNodeIds :: R.State SigmaxT.NodeIds
, showSidePanel :: GET.SidePanelState
, showSidePanel :: GET.SidePanelState
...
@@ -178,9 +180,10 @@ explorerCpt = R.hooksComponent "G.C.GraphExplorer.explorer" cpt
...
@@ -178,9 +180,10 @@ explorerCpt = R.hooksComponent "G.C.GraphExplorer.explorer" cpt
, session :: Session }
, session :: Session }
-> R.Element
-> R.Element
mSidebar Nothing _ = RH.div {} []
mSidebar Nothing _ = RH.div {} []
mSidebar (Just metaData) {frontends, graph, graphVersion, removedNodeIds, session, selectedNodeIds, showSidePanel} =
mSidebar (Just metaData) {frontends, graph, graph
Id, graph
Version, removedNodeIds, session, selectedNodeIds, showSidePanel} =
Sidebar.sidebar { frontends
Sidebar.sidebar { frontends
, graph
, graph
, graphId
, graphVersion
, graphVersion
, metaData
, metaData
, removedNodeIds
, removedNodeIds
...
...
src/Gargantext/Components/GraphExplorer/Sidebar.purs
View file @
1833bad9
...
@@ -24,15 +24,18 @@ import Gargantext.Components.NgramsTable.Core as NTC
...
@@ -24,15 +24,18 @@ import Gargantext.Components.NgramsTable.Core as NTC
import Gargantext.Components.Nodes.Corpus.Graph.Tabs as GT
import Gargantext.Components.Nodes.Corpus.Graph.Tabs as GT
import Gargantext.Components.RandomText (words)
import Gargantext.Components.RandomText (words)
import Gargantext.Data.Array (mapMaybe)
import Gargantext.Data.Array (mapMaybe)
import Gargantext.Ends (Frontends)
import Gargantext.Ends (Frontends
, url
)
import Gargantext.Hooks.Sigmax.Types as SigmaxT
import Gargantext.Hooks.Sigmax.Types as SigmaxT
import Gargantext.Routes as Routes
import Gargantext.Sessions (Session)
import Gargantext.Sessions (Session)
import Gargantext.Types (CTabNgramType, TabSubType(..), TabType(..), TermList(..), modeTabType)
import Gargantext.Types (CTabNgramType, TabSubType(..), TabType(..), TermList(..), modeTabType)
import Gargantext.Types as GT
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Reactix as R2
type Props =
type Props =
( frontends :: Frontends
( frontends :: Frontends
, graph :: SigmaxT.SGraph
, graph :: SigmaxT.SGraph
, graphId :: Int
, graphVersion :: R.State Int
, graphVersion :: R.State Int
, metaData :: GET.MetaData
, metaData :: GET.MetaData
, removedNodeIds :: R.State SigmaxT.NodeIds
, removedNodeIds :: R.State SigmaxT.NodeIds
...
@@ -64,6 +67,11 @@ sidebarCpt = R.hooksComponent "Sidebar" cpt
...
@@ -64,6 +67,11 @@ sidebarCpt = R.hooksComponent "Sidebar" cpt
[ RH.div { className: "", role: "tabpanel" }
[ RH.div { className: "", role: "tabpanel" }
(Seq.toUnfoldable $ (Seq.map (badge props.selectedNodeIds) (badges props.graph props.selectedNodeIds)))
(Seq.toUnfoldable $ (Seq.map (badge props.selectedNodeIds) (badges props.graph props.selectedNodeIds)))
]
]
, RH.div { className: "gexf" } [
RH.a { className: "btn btn-default"
, href: gexfHref props.session props.graphId
, target: "_blank" } [ RH.text "Download GEXF" ]
]
, RH.div { className: "tab-content" }
, RH.div { className: "tab-content" }
[
[
removeButton "Remove candidate" CandidateTerm props nodesMap
removeButton "Remove candidate" CandidateTerm props nodesMap
...
@@ -123,6 +131,9 @@ sidebarCpt = R.hooksComponent "Sidebar" cpt
...
@@ -123,6 +131,9 @@ sidebarCpt = R.hooksComponent "Sidebar" cpt
snd props.removedNodeIds $ const $ fst props.selectedNodeIds
snd props.removedNodeIds $ const $ fst props.selectedNodeIds
snd props.selectedNodeIds $ const SigmaxT.emptyNodeIds
snd props.selectedNodeIds $ const SigmaxT.emptyNodeIds
gexfHref :: Session -> Int -> String
gexfHref session graphId = url session $ Routes.NodeAPI GT.Graph (Just graphId) "gexf"
badge :: R.State SigmaxT.NodeIds -> Record SigmaxT.Node -> R.Element
badge :: R.State SigmaxT.NodeIds -> Record SigmaxT.Node -> R.Element
badge (_ /\ setNodeIds) {id, label} =
badge (_ /\ setNodeIds) {id, label} =
...
...
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