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
d8c7b234
Commit
d8c7b234
authored
Nov 20, 2021
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-merge' into dev
parents
f85f6ac1
012c7a58
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
9 deletions
+23
-9
DocsTable.purs
src/Gargantext/Components/DocsTable.purs
+22
-8
DocumentFormCreation.purs
...Gargantext/Components/DocsTable/DocumentFormCreation.purs
+1
-1
No files found.
src/Gargantext/Components/DocsTable.purs
View file @
d8c7b234
...
...
@@ -50,6 +50,7 @@ import Gargantext.Utils.CacheAPI as GUC
import Gargantext.Utils.QueryString (joinQueryStrings, mQueryParam, mQueryParamS, queryParam, queryParamS)
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Toestand as GUT
import Gargantext.Utils.Toestand as T2
import Reactix as R
import Reactix.DOM.HTML as H
import Simple.JSON as JSON
...
...
@@ -149,6 +150,13 @@ docViewCpt = here.component "docView" cpt where
toggleModal <- pure $ const $
T.modify_ not isDocumentModalVisibleBox
-- @onCreateDocumentEnd <AsyncProgress>
onCreateDocumentEnd <- pure $ \asyncProgress -> do
here.log2 "[DocsTables] NodeDocument task:" asyncProgress
T.write_ false onDocumentCreationPendingBox
toggleModal unit
T2.reload boxes.reloadMainPage
-- @createDocumentCallback
createDocumentCallback <- pure $ \fdata -> launchAff_ do
...
...
@@ -158,7 +166,12 @@ docViewCpt = here.component "docView" cpt where
eTask <- DFC.create session nodeId fdata
handleRESTError boxes.errors eTask
\t -> liftEffect $ launchDocumentCreationProgress boxes session nodeId t
\t -> liftEffect $ launchDocumentCreationProgress
boxes
session
nodeId
t
onCreateDocumentEnd
-- Render
pure $
...
...
@@ -221,18 +234,20 @@ launchDocumentCreationProgress ::
-> Session
-> GT.ID
-> GT.AsyncTaskWithType
-> (GT.AsyncProgress -> Effect Unit)
-> Effect Unit
launchDocumentCreationProgress boxes session nodeId currentTask
= void $ setTimeout 1000 $
launchAff_ $ scanDocumentCreationProgress boxes session nodeId currentTas
k
launchDocumentCreationProgress boxes session nodeId currentTask
cbk
= void $ setTimeout 1000 $
launchAff_ $
scanDocumentCreationProgress boxes session nodeId currentTask cb
k
scanDocumentCreationProgress ::
Boxes
-> Session
-> GT.ID
-> GT.AsyncTaskWithType
-> (GT.AsyncProgress -> Effect Unit)
-> Aff Unit
scanDocumentCreationProgress boxes session nodeId currentTask = do
scanDocumentCreationProgress boxes session nodeId currentTask
cbk
= do
eTask <- DFC.createProgress session nodeId currentTask
...
...
@@ -249,10 +264,9 @@ scanDocumentCreationProgress boxes session nodeId currentTask = do
if (hasEndingStatus status)
then
here.log2 "[DocsTables] NodeDocument task:" asyncProgress
-- @WIP: close modal, reload docs table
cbk asyncProgress
else
launchDocumentCreationProgress boxes session nodeId currentTask
launchDocumentCreationProgress boxes session nodeId currentTask
cbk
---------------------------------------------------
...
...
src/Gargantext/Components/DocsTable/DocumentFormCreation.purs
View file @
d8c7b234
...
...
@@ -284,4 +284,4 @@ createProgress
request = GR.NodeAPI GT.Node (Just nodeId)
(GT.asyncTaskTypePath GT.NodeDocument <> pollParams)
pollParams = id <> "/poll?limit1"
pollParams =
"/" <>
id <> "/poll?limit1"
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