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
2d9afdf7
Commit
2d9afdf7
authored
Oct 09, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Corpus] Adding V3 Corpus type and some fixes (cosmetics).
parent
72c016a0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
20 deletions
+16
-20
Tree.purs
src/Gargantext/Components/Tree.purs
+1
-1
Config.purs
src/Gargantext/Config.purs
+4
-0
Layout.purs
src/Gargantext/Pages/Layout.purs
+0
-4
Specs.purs
src/Gargantext/Pages/Layout/Specs.purs
+9
-10
Router.purs
src/Gargantext/Router.purs
+2
-5
No files found.
src/Gargantext/Components/Tree.purs
View file @
2d9afdf7
...
@@ -35,7 +35,7 @@ data Action = ShowPopOver
...
@@ -35,7 +35,7 @@ data Action = ShowPopOver
| ToggleFolder ID
| ToggleFolder ID
| RenameNode String
| RenameNode String
| Submit
| Submit
--| Initialize
--
| Initialize
type State = FTree
type State = FTree
...
...
src/Gargantext/Config.purs
View file @
2d9afdf7
...
@@ -112,6 +112,7 @@ data NodeType = NodeUser
...
@@ -112,6 +112,7 @@ data NodeType = NodeUser
| Annuaire
| Annuaire
| Children
| Children
| Corpus
| Corpus
| CorpusV3
| Dashboard
| Dashboard
| Document
| Document
| Error
| Error
...
@@ -133,6 +134,7 @@ urlConfig :: NodeType -> Url
...
@@ -133,6 +134,7 @@ urlConfig :: NodeType -> Url
urlConfig Annuaire = show Annuaire
urlConfig Annuaire = show Annuaire
urlConfig Children = show Children
urlConfig Children = show Children
urlConfig Corpus = show Corpus
urlConfig Corpus = show Corpus
urlConfig CorpusV3 = show CorpusV3
urlConfig Dashboard = show Dashboard
urlConfig Dashboard = show Dashboard
urlConfig Document = show Document
urlConfig Document = show Document
urlConfig Error = show Error
urlConfig Error = show Error
...
@@ -147,6 +149,7 @@ instance showNodeType :: Show NodeType where
...
@@ -147,6 +149,7 @@ instance showNodeType :: Show NodeType where
show Annuaire = "annuaire"
show Annuaire = "annuaire"
show Children = "children"
show Children = "children"
show Corpus = "corpus"
show Corpus = "corpus"
show CorpusV3 = "corpus"
show Dashboard = "dashboard"
show Dashboard = "dashboard"
show Document = "document"
show Document = "document"
show Error = "ErrorNodeType"
show Error = "ErrorNodeType"
...
@@ -169,6 +172,7 @@ readNodeType "Graph" = Graph
...
@@ -169,6 +172,7 @@ readNodeType "Graph" = Graph
readNodeType "Individu" = Individu
readNodeType "Individu" = Individu
readNodeType "Node" = Node
readNodeType "Node" = Node
readNodeType "NodeCorpus" = Corpus
readNodeType "NodeCorpus" = Corpus
readNodeType "NodeCorpusV3" = CorpusV3
readNodeType "NodeUser" = NodeUser
readNodeType "NodeUser" = NodeUser
readNodeType "Tree" = Tree
readNodeType "Tree" = Tree
readNodeType _ = Error
readNodeType _ = Error
...
...
src/Gargantext/Pages/Layout.purs
View file @
2d9afdf7
...
@@ -65,10 +65,6 @@ dispatchAction dispatcher _ (DocAnnotation i) = do
...
@@ -65,10 +65,6 @@ dispatchAction dispatcher _ (DocAnnotation i) = do
dispatcher $ SetRoute $ DocAnnotation i
dispatcher $ SetRoute $ DocAnnotation i
-- dispatcher $ DocAnnotationViewA TODO
-- dispatcher $ DocAnnotationViewA TODO
dispatchAction dispatcher _ Tabview = do
dispatcher $ SetRoute Tabview
-- dispatcher $ TabViewA TODO
dispatchAction dispatcher _ PGraphExplorer = do
dispatchAction dispatcher _ PGraphExplorer = do
dispatcher $ SetRoute PGraphExplorer
dispatcher $ SetRoute PGraphExplorer
dispatcher $ GraphExplorerA $ GE.LoadGraph "imtNew.json"
dispatcher $ GraphExplorerA $ GE.LoadGraph "imtNew.json"
...
...
src/Gargantext/Pages/Layout/Specs.purs
View file @
2d9afdf7
module Gargantext.Pages.Layout.Specs where
module Gargantext.Pages.Layout.Specs where
import Prelude hiding (div)
import Data.Foldable (fold, intercalate)
import Data.Foldable (fold, intercalate)
import Data.Lens (over)
import Data.Lens (over)
import Data.Maybe (Maybe(Nothing, Just))
import Data.Maybe (Maybe(Nothing, Just))
import Effect (Effect)
import Effect (Effect)
import React (ReactElement)
import React.DOM (a, button, div, footer, hr', img, input, li, p, span, text, ul)
import React.DOM.Props (_data, _id, _type, aria, className, href, onChange, onClick, placeholder, role, src, style, tabIndex, target, title)
import Thermite (Render, Spec, _render, defaultPerformAction, defaultRender, focus, simpleSpec, withState, noState)
import Unsafe.Coerce (unsafeCoerce)
import Gargantext.Prelude
import Gargantext.Components.Data.Lang (Lang(..))
import Gargantext.Components.Data.Lang (Lang(..))
import Gargantext.Components.Login as LN
import Gargantext.Components.Login as LN
import Gargantext.Components.Tree as Tree
import Gargantext.Components.Tree as Tree
import Gargantext.Pages.Annuaire as A
import Gargantext.Folder as F
import Gargantext.Folder as F
import Gargantext.Pages.Annuaire as A
import Gargantext.Pages.Annuaire.User.Users as U
import Gargantext.Pages.Corpus as Corpus
import Gargantext.Pages.Corpus as Corpus
import Gargantext.Pages.Corpus.Doc.Annotation as Annotation
import Gargantext.Pages.Corpus.Doc.Annotation as Annotation
import Gargantext.Pages.Corpus.Doc.Facets as TV
import Gargantext.Pages.Corpus.Doc.Facets as TV
...
@@ -18,18 +24,12 @@ import Gargantext.Pages.Corpus.Doc.Facets.Dashboard as Dsh
...
@@ -18,18 +24,12 @@ import Gargantext.Pages.Corpus.Doc.Facets.Dashboard as Dsh
import Gargantext.Pages.Corpus.Doc.Facets.Documents as DV
import Gargantext.Pages.Corpus.Doc.Facets.Documents as DV
import Gargantext.Pages.Corpus.Doc.Facets.Graph as GE
import Gargantext.Pages.Corpus.Doc.Facets.Graph as GE
import Gargantext.Pages.Corpus.Doc.Facets.Terms.NgramsTable as NG
import Gargantext.Pages.Corpus.Doc.Facets.Terms.NgramsTable as NG
import Gargantext.Pages.Annuaire.User.Users as U
import Gargantext.Pages.Home as L
import Gargantext.Pages.Home as L
import Gargantext.Pages.Layout.Actions (Action(..), _corpusAction, _addCorpusAction, _docAnnotationViewAction, _docViewAction, _graphExplorerAction, _loginAction, _searchAction, _treeAction, _userPageAction, performAction, _annuaireAction)
import Gargantext.Pages.Layout.Actions (Action(..), _corpusAction, _addCorpusAction, _docAnnotationViewAction, _docViewAction, _graphExplorerAction, _loginAction, _searchAction, _treeAction, _userPageAction, performAction, _annuaireAction)
import Gargantext.Pages.Layout.Specs.AddCorpus as AC
import Gargantext.Pages.Layout.Specs.AddCorpus as AC
import Gargantext.Pages.Layout.Specs.Search as S
import Gargantext.Pages.Layout.Specs.Search as S
import Gargantext.Pages.Layout.States (AppState, _corpusState, _addCorpusState, _docAnnotationViewState, _docViewState, _graphExplorerState, _loginState, _searchState, _treeState, _userPageState, _annuaireState)
import Gargantext.Pages.Layout.States (AppState, _corpusState, _addCorpusState, _docAnnotationViewState, _docViewState, _graphExplorerState, _loginState, _searchState, _treeState, _userPageState, _annuaireState)
import Gargantext.Router (Routes(..))
import Gargantext.Router (Routes(..))
import React (ReactElement)
import React.DOM (a, button, div, footer, hr', img, input, li, p, span, text, ul)
import React.DOM.Props (_data, _id, _type, aria, className, href, onChange, onClick, placeholder, role, src, style, tabIndex, target, title)
import Thermite (Render, Spec, _render, defaultPerformAction, defaultRender, focus, simpleSpec, withState, noState)
import Unsafe.Coerce (unsafeCoerce)
layoutSpec :: Spec AppState {} Action
layoutSpec :: Spec AppState {} Action
layoutSpec =
layoutSpec =
...
@@ -63,7 +63,6 @@ pagesComponent s =
...
@@ -63,7 +63,6 @@ pagesComponent s =
selectSpec (DocAnnotation i) = layout0 $ focus _docAnnotationViewState
selectSpec (DocAnnotation i) = layout0 $ focus _docAnnotationViewState
_docAnnotationViewAction Annotation.docview
_docAnnotationViewAction Annotation.docview
-- To be removed
-- To be removed
selectSpec Tabview = layout0 $ noState TV.pureTab1
selectSpec SearchView = layout0 $ focus _searchState _searchAction S.searchSpec
selectSpec SearchView = layout0 $ focus _searchState _searchAction S.searchSpec
selectSpec NGramsTable = layout0 $ noState NG.ngramsTableSpec
selectSpec NGramsTable = layout0 $ noState NG.ngramsTableSpec
selectSpec PGraphExplorer = focus _graphExplorerState _graphExplorerAction GE.specOld
selectSpec PGraphExplorer = focus _graphExplorerState _graphExplorerAction GE.specOld
...
...
src/Gargantext/Router.purs
View file @
2d9afdf7
...
@@ -19,7 +19,6 @@ data Routes
...
@@ -19,7 +19,6 @@ data Routes
| Folder Int
| Folder Int
| Corpus Int
| Corpus Int
| AddCorpus
| AddCorpus
| Tabview
| DocView Int
| DocView Int
| DocAnnotation Int
| DocAnnotation Int
| PGraphExplorer
| PGraphExplorer
...
@@ -35,9 +34,8 @@ routing =
...
@@ -35,9 +34,8 @@ routing =
<|> AddCorpus <$ route "addCorpus"
<|> AddCorpus <$ route "addCorpus"
<|> Folder <$> (route "folder" *> int)
<|> Folder <$> (route "folder" *> int)
<|> Corpus <$> (route "corpus" *> int)
<|> Corpus <$> (route "corpus" *> int)
<|> Tabview <$ route "tabview"
<|> DocView <$> (route "docView" *> int)
<|> DocView <$> (route "docView" *> int)
<|> NGramsTable <$ route "ngrams"
<|> NGramsTable <$ route "ngrams"
<|> DocAnnotation <$> (route "document" *> int)
<|> DocAnnotation <$> (route "document" *> int)
<|> Dashboard <$ route "dashboard"
<|> Dashboard <$ route "dashboard"
<|> PGraphExplorer <$ route "graph"
<|> PGraphExplorer <$ route "graph"
...
@@ -58,7 +56,6 @@ instance showRoutes :: Show Routes where
...
@@ -58,7 +56,6 @@ instance showRoutes :: Show Routes where
show (UserPage i) = "User" <> show i
show (UserPage i) = "User" <> show i
show (DocAnnotation i)= "Document"
show (DocAnnotation i)= "Document"
show (Corpus i) = "Corpus" <> show i
show (Corpus i) = "Corpus" <> show i
show Tabview = "Tabview"
show (DocView i) = "DocView"
show (DocView i) = "DocView"
show NGramsTable = "NGramsTable"
show NGramsTable = "NGramsTable"
show (Annuaire i) = "Annuaire" <> show i
show (Annuaire i) = "Annuaire" <> show i
...
...
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