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
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
gargantext
purescript-gargantext
Commits
7003f000
Commit
7003f000
authored
Jan 15, 2023
by
Karen Konou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Node frame analysis] upload functions
parent
20f92af7
Pipeline
#3592
failed with stage
in 0 seconds
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
8 deletions
+22
-8
Tree.purs
src/Gargantext/Components/Forest/Tree.purs
+3
-3
Types.purs
src/Gargantext/Components/Forest/Tree/Node/Action/Types.purs
+1
-1
WriteNodesDocuments.purs
...mponents/Forest/Tree/Node/Action/WriteNodesDocuments.purs
+11
-4
Lang.purs
src/Gargantext/Components/Lang.purs
+7
-0
No files found.
src/Gargantext/Components/Forest/Tree.purs
View file @
7003f000
...
...
@@ -384,8 +384,8 @@ linkNode nodeType params p@{ boxes: { errors }, session } = traverse_ f params w
handleRESTError errors eTask $ \_task -> pure unit
refreshTree p
documentsFromWriteNodes
id
p@{ boxes: { errors }, session } = do
eTask <- documentsFromWriteNodesReq session
id
documentsFromWriteNodes
params
p@{ boxes: { errors }, session } = do
eTask <- documentsFromWriteNodesReq session
params
handleRESTError errors eTask $ \_task -> pure unit
refreshTree p
...
...
@@ -411,5 +411,5 @@ performAction (MergeNode {params}) p = mergeNode params
performAction (LinkNode { nodeType, params }) p = linkNode nodeType params p
performAction RefreshTree p = refreshTree p
performAction CloseBox p = closeBox p
performAction (DocumentsFromWriteNodes
{ id }) p = documentsFromWriteNodes id
p
performAction (DocumentsFromWriteNodes
params) p = documentsFromWriteNodes params
p
performAction NoAction _ = liftEffect $ here.log "[performAction] NoAction"
src/Gargantext/Components/Forest/Tree/Node/Action/Types.purs
View file @
7003f000
...
...
@@ -30,7 +30,7 @@ data Action = AddNode String GT.NodeType
| MergeNode {params :: Maybe SubTreeOut}
| LinkNode {nodeType :: Maybe GT.NodeType, params :: Maybe SubTreeOut}
| DocumentsFromWriteNodes { id :: GT.ID }
| DocumentsFromWriteNodes { id :: GT.ID
, lang :: Lang, selection :: Selection, paragraphs :: String
}
| NoAction
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/WriteNodesDocuments.purs
View file @
7003f000
...
...
@@ -119,11 +119,18 @@ actionWriteNodesDocumentsCpt = here.component "actionWriteNodesDocuments" cpt wh
]
]
pure $ panel bodies (submitButton (DocumentsFromWriteNodes { id }) dispatch)
pure $ panel bodies (submitButton (DocumentsFromWriteNodes { id
, lang: lang', selection: selection', paragraphs: paragraphs'
}) dispatch)
documentsFromWriteNodesReq :: Session -> GT.ID -> AffRESTError GT.AsyncTaskWithType
documentsFromWriteNodesReq session id = do
type Params =
( id :: GT.ID
, selection :: ListSelection.Selection
, lang :: Lang
, paragraphs :: String
)
documentsFromWriteNodesReq :: Session -> Record Params -> AffRESTError GT.AsyncTaskWithType
documentsFromWriteNodesReq session params@{ id } = do
eTask :: Either RESTError GT.AsyncTask <-
post session (NodeAPI GT.Node (Just id) "documents-from-write-nodes")
{ id }
post session (NodeAPI GT.Node (Just id) "documents-from-write-nodes")
params
pure $ (\task -> GT.AsyncTaskWithType { task, typ: GT.UpdateNode }) <$> eTask
src/Gargantext/Components/Lang.purs
View file @
7003f000
...
...
@@ -4,10 +4,14 @@ import Gargantext.Prelude
import Data.Argonaut (class EncodeJson, encodeJson)
import Data.Array as A
import Data.Generic.Rep (class Generic)
import Data.Lens.Lens.Product (_1)
import Data.Maybe (Maybe(..))
import Data.Newtype (class Newtype)
import Gargantext.Utils.Reactix as R2
import Reactix as R
import Reactix.DOM.HTML as H
import Simple.JSON as JSON
import Toestand as T
here :: R2.Here
...
...
@@ -42,6 +46,9 @@ instance Read Lang where
instance EncodeJson Lang where
encodeJson a = encodeJson (show a)
instance JSON.WriteForeign Lang where
writeImpl l = JSON.writeImpl $ show l
-- Language used for the landing page
data LandingLang = LL_EN | LL_FR
...
...
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