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
cae0c4bc
Commit
cae0c4bc
authored
Nov 23, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NGRAMS][Table] needs to adapt the type of tab for the loader.
parent
0f076527
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
18 deletions
+26
-18
Config.purs
src/Gargantext/Config.purs
+8
-7
NgramsTable.purs
src/Gargantext/Pages/Corpus/Tabs/Ngrams/NgramsTable.purs
+11
-10
Specs.purs
src/Gargantext/Pages/Corpus/Tabs/Specs.purs
+7
-1
No files found.
src/Gargantext/Config.purs
View file @
cae0c4bc
...
...
@@ -31,7 +31,7 @@ endConfig' v = { front : frontCaddy
-- until authentication implementation
-- (Default Root will be given after authentication)
defaultRoot :: Int
defaultRoot = 9
43779
defaultRoot = 9
50094
------------------------------------------------------------------------
frontCaddy :: Config
frontCaddy = { proto : "http://"
...
...
@@ -149,13 +149,14 @@ instance showApiVersion :: Show ApiVersion where
show V11 = "v1.1"
------------------------------------------------------------
data TabType = TabDocs | TabTerms | TabSources | TabAuthors | TabTrash
data TabType = TabDocs | TabTerms | TabSources | TabAuthors | Tab
Institutes | Tab
Trash
instance showTabType :: Show TabType where
show TabDocs = "Docs"
show TabTerms = "Terms"
show TabSources = "Sources"
show TabAuthors = "Authors"
show TabInstitutes = "Institutes"
show TabTrash = "Trash"
------------------------------------------------------------
...
...
src/Gargantext/Pages/Corpus/Tabs/Ngrams/NgramsTable.purs
View file @
cae0c4bc
...
...
@@ -297,7 +297,7 @@ data Action
| SetTermTypeFilter (Maybe TermType)
| SetSearchQuery String
data Mode = Authors | Sources |
Terms | Trash
data Mode = Authors | Sources |
Institutes | Terms
type Dispatch = Action -> Effect Unit
...
...
@@ -488,11 +488,12 @@ type PageLoaderProps =
--, corpusInfo :: Maybe (NodePoly CorpusInfo)
}
get
NgramsTable ::
Maybe Int -> Aff NgramsTable
get
NgramsTable = get <<< toUrl Back (Ngrams TabTerms
Nothing)
get
Table :: TabType ->
Maybe Int -> Aff NgramsTable
get
Table tab = get <<< toUrl Back (Ngrams tab
Nothing)
-- TODO TabTerms or TabAuthors ...
loadPage :: PageParams -> Aff NgramsTable
loadPage {nodeId} = get
NgramsTable
(Just nodeId) -- TODO this ignores params
loadPage {nodeId} = get
Table TabTerms
(Just nodeId) -- TODO this ignores params
ngramsLoaderClass :: ReactClass (Loader.Props PageParams NgramsTable)
ngramsLoaderClass = Loader.createLoaderClass "NgramsLoader" loadPage
...
...
src/Gargantext/Pages/Corpus/Tabs/Specs.purs
View file @
cae0c4bc
...
...
@@ -23,6 +23,7 @@ statefulTabs =
Tab.tabs _tablens _tabAction $ fromFoldable [ Tuple "Documents" docPageSpec
, Tuple "Authors" authorPageSpec
, Tuple "Sources" sourcePageSpec
, Tuple "Institutes" institutesPageSpec
, Tuple "Terms" termsPageSpec
, Tuple "Trash" trashPageSpec
]
...
...
@@ -41,8 +42,13 @@ authorPageSpec = ngramsViewSpec {mode: NV.Authors}
sourcePageSpec :: Spec State Props Action
sourcePageSpec = ngramsViewSpec {mode: NV.Sources}
institutesPageSpec :: Spec State Props Action
institutesPageSpec = ngramsViewSpec {mode: NV.Institutes}
termsPageSpec :: Spec State Props Action
termsPageSpec = ngramsViewSpec {mode: NV.Terms}
trashPageSpec :: Spec State Props Action
trashPageSpec = ngramsViewSpec {mode: NV.Trash}
trashPageSpec = focus _doclens _docAction DV.layoutDocview
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