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
7d49a203
Commit
7d49a203
authored
Jun 22, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-refact' into dev
parents
d520d23f
c132be2e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
22 deletions
+5
-22
Update.purs
...Gargantext/Components/Forest/Tree/Node/Action/Update.purs
+3
-22
ProgressBar.purs
...antext/Components/Forest/Tree/Node/Tools/ProgressBar.purs
+2
-0
No files found.
src/Gargantext/Components/Forest/Tree/Node/Action/Update.purs
View file @
7d49a203
...
@@ -16,32 +16,13 @@ import Reactix.DOM.HTML as H
...
@@ -16,32 +16,13 @@ import Reactix.DOM.HTML as H
updateRequest :: UpdateNodeParams -> Session -> ID -> Aff GT.AsyncTaskWithType
updateRequest :: UpdateNodeParams -> Session -> ID -> Aff GT.AsyncTaskWithType
updateRequest
(UpdateNodeParamsList meth)
session nodeId = do
updateRequest
updateNodeParams
session nodeId = do
task <- post session p
meth
task <- post session p
updateNodeParams
pure $ GT.AsyncTaskWithType {task, typ: GT.UpdateNode }
pure $ GT.AsyncTaskWithType {task, typ: GT.UpdateNode }
where
where
p = GR.NodeAPI GT.Node (Just nodeId) "update/nobody"
p = GR.NodeAPI GT.Node (Just nodeId) "update"
updateRequest (UpdateNodeParamsGraph meth) session nodeId = do
task <- post session p meth
pure $ GT.AsyncTaskWithType {task, typ: GT.UpdateNode }
where
p = GR.NodeAPI GT.Node (Just nodeId) "update/nobody"
updateRequest (UpdateNodeParamsTexts meth) session nodeId = do
task <- post session p meth
pure $ GT.AsyncTaskWithType {task, typ: GT.UpdateNode }
where
p = GR.NodeAPI GT.Node (Just nodeId) "update/nobody"
updateRequest (UpdateNodeParamsBoard meth) session nodeId = do
task <- post session p meth
pure $ GT.AsyncTaskWithType {task, typ: GT.UpdateNode }
where
p = GR.NodeAPI GT.Node (Just nodeId) "update/nobody"
----------------------------------------------------------------------
----------------------------------------------------------------------
update :: NodeType
update :: NodeType
-> (Action -> Aff Unit)
-> (Action -> Aff Unit)
-> R.Hooks R.Element
-> R.Hooks R.Element
...
...
src/Gargantext/Components/Forest/Tree/Node/Tools/ProgressBar.purs
View file @
7d49a203
...
@@ -109,3 +109,5 @@ queryProgress { asyncTask: GT.AsyncTaskWithType { task: GT.AsyncTask {id}
...
@@ -109,3 +109,5 @@ queryProgress { asyncTask: GT.AsyncTaskWithType { task: GT.AsyncTask {id}
p GT.UpdateNode = NodeAPI GT.Node (Just corpusId) $ path <> id <> "/poll?limit=1"
p GT.UpdateNode = NodeAPI GT.Node (Just corpusId) $ path <> id <> "/poll?limit=1"
p _ = NodeAPI GT.Corpus (Just corpusId) $ path <> id <> "/poll?limit=1"
p _ = NodeAPI GT.Corpus (Just corpusId) $ path <> id <> "/poll?limit=1"
path = GT.asyncTaskTypePath typ
path = GT.asyncTaskTypePath typ
-- TODO wait route: take the result if failure then message
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