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
cdd2a90d
Commit
cdd2a90d
authored
Oct 05, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PAGE][Corps][Backend Connection] data fetched and rendered (need to fix the chart).
parent
1a71faf8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
28 deletions
+30
-28
Annuaire.purs
src/Gargantext/Pages/Corpus/Annuaire.purs
+8
-7
Layout.purs
src/Gargantext/Pages/Layout.purs
+3
-3
Specs.purs
src/Gargantext/Pages/Layout/Specs.purs
+4
-3
Router.purs
src/Gargantext/Router.purs
+15
-15
No files found.
src/Gargantext/Pages/Corpus/Annuaire.purs
View file @
cdd2a90d
...
@@ -179,20 +179,21 @@ instance decodeAnnuaireTable :: DecodeJson AnnuaireTable where
...
@@ -179,20 +179,21 @@ instance decodeAnnuaireTable :: DecodeJson AnnuaireTable where
------------------------------------------------------------------------
------------------------------------------------------------------------
performAction :: PerformAction State {} Action
performAction :: PerformAction State {} Action
performAction (Load aId) _ _ = do
performAction (Load aId) _ _ = do
eitherInfo <- lift $ getInfo aId
_ <- case eitherInfo of
(Right info') -> void $ modifyState $ _info ?~ info'
(Left err) -> do
liftEffect $ log err
eitherTable <- lift $ getTable aId
eitherTable <- lift $ getTable aId
liftEffect $ log "Feching Table"
liftEffect $ log "Feching Table"
_ <- case eitherTable of
_ <- case eitherTable of
(Right table') -> void $ modifyState $ _table ?~ table'
(Right table') -> void $ modifyState $ _table ?~ table'
(Left err) -> do
(Left err) -> do
liftEffect $ log err
liftEffect $ log err
liftEffect <<< log $ "Annuaire page fetched."
eitherInfo <- lift $ getInfo aId
_ <- case eitherInfo of
(Right info') -> void $ modifyState $ _info ?~ info'
(Left err) -> do
liftEffect $ log err
liftEffect <<< log $ "Fetching annuaire page..."
performAction _ _ _ = pure unit
performAction _ _ _ = pure unit
------------------------------------------------------------------------
------------------------------------------------------------------------
getTable :: Int -> Aff (Either String AnnuaireTable)
getTable :: Int -> Aff (Either String AnnuaireTable)
...
...
src/Gargantext/Pages/Layout.purs
View file @
cdd2a90d
...
@@ -63,9 +63,9 @@ dispatchAction dispatcher _ Tabview = do
...
@@ -63,9 +63,9 @@ dispatchAction dispatcher _ Tabview = do
dispatcher $ SetRoute Tabview
dispatcher $ SetRoute Tabview
-- dispatcher $ TabViewA TODO
-- dispatcher $ TabViewA TODO
dispatchAction dispatcher _
CorpusAnalysis
= do
dispatchAction dispatcher _
(Corpus n)
= do
dispatcher $ SetRoute
CorpusAnalysis
dispatcher $ SetRoute
$ Corpus n
-- dispatcher $ CorpusAnalysisA TODO
dispatcher $ DocViewA $ DV.LoadData n
dispatchAction dispatcher _ PGraphExplorer = do
dispatchAction dispatcher _ PGraphExplorer = do
dispatcher $ SetRoute PGraphExplorer
dispatcher $ SetRoute PGraphExplorer
...
...
src/Gargantext/Pages/Layout/Specs.purs
View file @
cdd2a90d
...
@@ -12,7 +12,7 @@ import Gargantext.Components.Tree as Tree
...
@@ -12,7 +12,7 @@ import Gargantext.Components.Tree as Tree
import Gargantext.Pages.Corpus.Annuaire as A
import Gargantext.Pages.Corpus.Annuaire as A
import Gargantext.Folder as F
import Gargantext.Folder as F
import Gargantext.Pages.Corpus as CA
import Gargantext.Pages.Corpus as CA
import Gargantext.Pages.Corpus.Doc.Annotation as
D
import Gargantext.Pages.Corpus.Doc.Annotation as
Annotation
import Gargantext.Pages.Corpus.Doc.Facets as TV
import Gargantext.Pages.Corpus.Doc.Facets as TV
import Gargantext.Pages.Corpus.Doc.Facets.Dashboard as Dsh
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
...
@@ -54,13 +54,14 @@ pagesComponent s =
...
@@ -54,13 +54,14 @@ pagesComponent s =
Nothing -> selectSpec Home
Nothing -> selectSpec Home
where
where
selectSpec :: Routes -> Spec AppState {} Action
selectSpec :: Routes -> Spec AppState {} Action
selectSpec
CorpusAnalysis = layout0 $ noState CA.spec'
selectSpec
(Corpus i) = layout0 $ focus _docViewState _docViewAction DV.layoutDocview
selectSpec Login = focus _loginState _loginAction LN.renderSpec
selectSpec Login = focus _loginState _loginAction LN.renderSpec
selectSpec Home = layout0 $ noState (L.layoutLanding EN)
selectSpec Home = layout0 $ noState (L.layoutLanding EN)
selectSpec AddCorpus = layout0 $ focus _addCorpusState _addCorpusAction AC.layoutAddcorpus
selectSpec AddCorpus = layout0 $ focus _addCorpusState _addCorpusAction AC.layoutAddcorpus
selectSpec (DocView i) = layout0 $ focus _docViewState _docViewAction DV.layoutDocview
selectSpec (DocView i) = layout0 $ focus _docViewState _docViewAction DV.layoutDocview
selectSpec (UserPage i) = layout0 $ focus _userPageState _userPageAction U.layoutUser
selectSpec (UserPage i) = layout0 $ focus _userPageState _userPageAction U.layoutUser
selectSpec (DocAnnotation i) = layout0 $ focus _docAnnotationViewState _docAnnotationViewAction D.docview
selectSpec (DocAnnotation i) = layout0 $ focus _docAnnotationViewState
_docAnnotationViewAction Annotation.docview
selectSpec Tabview = layout0 $ noState TV.pureTab1
selectSpec Tabview = layout0 $ noState TV.pureTab1
-- To be removed
-- To be removed
selectSpec SearchView = layout0 $ focus _searchState _searchAction S.searchSpec
selectSpec SearchView = layout0 $ focus _searchState _searchAction S.searchSpec
...
...
src/Gargantext/Router.purs
View file @
cdd2a90d
...
@@ -22,7 +22,7 @@ data Routes
...
@@ -22,7 +22,7 @@ data Routes
| UserPage Int
| UserPage Int
| DocAnnotation Int
| DocAnnotation Int
| Tabview
| Tabview
| Corpus
Analysis
| Corpus
Int
| PGraphExplorer
| PGraphExplorer
| NGramsTable
| NGramsTable
| Dashboard
| Dashboard
...
@@ -35,15 +35,15 @@ instance showRoutes :: Show Routes where
...
@@ -35,15 +35,15 @@ instance showRoutes :: Show Routes where
show AddCorpus = "AddCorpus"
show AddCorpus = "AddCorpus"
show (DocView i) = "DocView"
show (DocView i) = "DocView"
show SearchView = "Search"
show SearchView = "Search"
show (UserPage i) = "User"
show (UserPage i) = "User"
<> show i
show (DocAnnotation i)= "Document"
show (DocAnnotation i)= "Document"
show Tabview = "Tabview"
show Tabview = "Tabview"
show CorpusAnalysis = "Corpus"
show PGraphExplorer = "graphExplorer"
show PGraphExplorer = "graphExplorer"
show NGramsTable = "NGramsTable"
show NGramsTable = "NGramsTable"
show Dashboard = "Dashboard"
show Dashboard = "Dashboard"
show (Annuaire i) = "Annuaire"
show (Corpus i) = "Corpus" <> show i
show (Folder i) = "Folder"
show (Annuaire i) = "Annuaire" <> show i
show (Folder i) = "Folder" <> show i
show Home = "Home"
show Home = "Home"
int :: Match Int
int :: Match Int
...
@@ -51,20 +51,20 @@ int = floor <$> num
...
@@ -51,20 +51,20 @@ int = floor <$> num
routing :: Match Routes
routing :: Match Routes
routing =
routing =
Login <$ route "login"
Login <$
route "login"
<|> Tabview <$ route "tabview"
<|> Tabview <$
route "tabview"
<|> DocAnnotation <$> (route "document" *> int)
<|> DocAnnotation <$> (route "document" *> int)
<|> UserPage <$> (route "user" *> int)
<|> UserPage <$> (route "user" *> int)
<|> SearchView <$ route "search"
<|> SearchView <$
route "search"
<|> DocView <$> (route "docView" *> int)
<|> DocView <$> (route "docView"
*> int)
<|> AddCorpus <$ route "addCorpus"
<|> AddCorpus <$
route "addCorpus"
<|> Corpus
Analysis <$ route "corpus"
<|> Corpus
<$> (route "corpus" *> int)
<|> PGraphExplorer <$ route "graph"
<|> PGraphExplorer <$
route "graph"
<|> NGramsTable <$ route "ngrams"
<|> NGramsTable <$
route "ngrams"
<|> Dashboard <$ route "dashboard"
<|> Dashboard <$
route "dashboard"
<|> Annuaire <$> (route "annuaire" *> int)
<|> Annuaire <$> (route "annuaire" *> int)
<|> Folder <$> (route "folder" *> int)
<|> Folder <$> (route "folder" *> int)
<|> Home <$ lit ""
<|> Home <$
lit ""
where
where
route str = lit "" *> lit str
route str = lit "" *> lit str
...
...
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