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
5eac69cc
Commit
5eac69cc
authored
Jun 27, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] Graph FacetTable: OK for demo at EHESS with some Shuffled Portraits.
parent
94ba7eb9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
7 deletions
+14
-7
FacetsTable.purs
src/Gargantext/Components/FacetsTable.purs
+1
-1
Types.purs
src/Gargantext/Components/GraphExplorer/Types.purs
+7
-2
Config.purs
src/Gargantext/Config.purs
+3
-1
Graph.purs
src/Gargantext/Pages/Corpus/Graph.purs
+1
-1
Tabs.purs
src/Gargantext/Pages/Corpus/Graph/Tabs.purs
+2
-2
No files found.
src/Gargantext/Components/FacetsTable.purs
View file @
5eac69cc
...
...
@@ -385,7 +385,7 @@ renderPage loaderDispatch { totalRecords, dispatch, container
]
-- TODO show date: Year-Month-Day only
, div strikeIfDeleted [text date]
, a (strikeIfDeleted <> [ href (toUrl Front
Url_Document
(Just id))
, a (strikeIfDeleted <> [ href (toUrl Front
(ListDocument (Just listId))
(Just id))
, target "blank"])
[ text title ]
, div strikeIfDeleted [text source]
...
...
src/Gargantext/Components/GraphExplorer/Types.purs
View file @
5eac69cc
...
...
@@ -31,12 +31,14 @@ newtype Edge = Edge
derive instance newtypeEdge :: Newtype Edge _
type ListId = Int
type CorpusId = Int
type CorpusLabel = String
newtype GraphSideCorpus = GraphSideCorpus
{ corpusId :: CorpusId
, corpusLabel :: CorpusLabel
, listId :: ListId
}
newtype GraphData = GraphData
...
...
@@ -54,6 +56,7 @@ newtype MetaData = MetaData
title :: String
, legend :: Array Legend
, corpusId :: Array Int
, listId :: ListId
}
...
...
@@ -65,8 +68,9 @@ instance decodeJsonGraphData :: DecodeJson GraphData where
-- TODO: sides
metadata <- obj .? "metadata"
corpusIds <- metadata .? "corpusId"
listId' <- metadata .? "listId"
metaData <- obj .? "metadata"
let side x = GraphSideCorpus { corpusId: x, corpusLabel: "Publications"
}
let side x = GraphSideCorpus { corpusId: x, corpusLabel: "Publications"
, listId : listId'
}
let sides = side <$> corpusIds
pure $ GraphData { nodes, edges, sides, metaData }
...
...
@@ -89,7 +93,8 @@ instance decodeJsonMetaData :: DecodeJson MetaData where
title <- obj .? "title"
legend <- obj .? "legend"
corpusId <- obj .? "corpusId"
pure $ MetaData { title, legend, corpusId }
listId <- obj .? "listId"
pure $ MetaData { title, legend, corpusId, listId}
instance decodeJsonLegend :: DecodeJson Legend where
...
...
src/Gargantext/Config.purs
View file @
5eac69cc
...
...
@@ -165,6 +165,8 @@ pathUrl c (GetNgrams
TabCorpus _ -> pathUrl c (NodeAPI Node) i
_ -> pathUrl c (NodeAPI Url_Document) i
pathUrl c (ListDocument lId) dId =
pathUrl c (NodeAPI NodeList) lId <> "/document/" <> (show $ maybe 0 identity dId)
pathUrl c (PutNgrams t listid termList) i =
pathUrl c (NodeAPI Node) i <> "/ngrams?ngramsType="
...
...
@@ -242,7 +244,6 @@ data NodeType = NodeUser
| Tree
| NodeList
instance showNodeType :: Show NodeType where
show NodeUser = "NodeUser"
show Annuaire = "Annuaire"
...
...
@@ -330,6 +331,7 @@ data Path
| PutNgrams TabType (Maybe ListId) (Maybe TermList)
-- ^ The name is not good. In particular this URL is used both in PUT and POST.
| NodeAPI NodeType
| ListDocument (Maybe ListId)
| Search { {-id :: Int
, query :: Array String
,-}
...
...
src/Gargantext/Pages/Corpus/Graph.purs
View file @
5eac69cc
...
...
@@ -121,7 +121,7 @@ derive instance newtypeState :: Newtype State _
initialState :: State
initialState = State
{ graphData : GraphData {nodes: [], edges: [], sides: [], metaData : Just $ MetaData{title : "", legend : [], corpusId : []}}
{ graphData : GraphData {nodes: [], edges: [], sides: [], metaData : Just $ MetaData{title : "", legend : [], corpusId : []
, listId : 0
}}
, filePath : ""
, sigmaGraphData : Nothing
, legendData : []
...
...
src/Gargantext/Pages/Corpus/Graph/Tabs.purs
View file @
5eac69cc
...
...
@@ -27,9 +27,9 @@ pureTabs :: Spec {} Props Void
pureTabs = hideState (const {activeTab: 0}) statefulTabs
tab :: forall props state. TextQuery -> GraphSideCorpus -> Tuple String (Spec state props Tab.Action)
tab query (GraphSideCorpus {corpusId: nodeId, corpusLabel}) =
tab query (GraphSideCorpus {corpusId: nodeId, corpusLabel
, listId
}) =
Tuple corpusLabel $
cmapProps (const {nodeId, listId
: 0
, query, chart, totalRecords: 4736, container}) $
cmapProps (const {nodeId, listId, query, chart, totalRecords: 4736, container}) $
noState docViewSpec
where
-- TODO totalRecords: probably need to insert a corpusLoader.
...
...
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