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
518ccfba
Commit
518ccfba
authored
Jan 10, 2023
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ngrams] fix for list JSON import
parent
2d0c334a
Pipeline
#3554
canceled with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
Upload.purs
...Gargantext/Components/Forest/Tree/Node/Action/Upload.purs
+8
-5
No files found.
src/Gargantext/Components/Forest/Tree/Node/Action/Upload.purs
View file @
518ccfba
...
...
@@ -559,6 +559,10 @@ uploadFile { contents, fileFormat, lang, fileType, id, nodeType, mName, selectio
, Tuple "_wf_name" mName
, Tuple "_wf_selection" (Just $ show selection)
]
jsonBodyParams = [ Tuple "_wjf_data" (Just contents)
, Tuple "_wjf_filetype" (Just $ show fileType)
, Tuple "_wjf_name" mName
]
csvBodyParams = [ Tuple "_wtf_data" (Just contents)
, Tuple "_wtf_filetype" (Just $ show NodeList)
, Tuple "_wtf_fileformat" (Just $ show fileFormat)
...
...
@@ -571,7 +575,7 @@ uploadFile { contents, fileFormat, lang, fileType, id, nodeType, mName, selectio
Corpus -> GT.CorpusFormUpload /\ (GR.NodeAPI nodeType (Just id) $ GT.asyncTaskTypePath GT.CorpusFormUpload) /\ bodyParams
Annuaire -> GT.UploadFile /\ (GR.NodeAPI nodeType (Just id) "annuaire") /\ bodyParams
NodeList -> case fileType of
JSON -> GT.ListUpload /\ (GR.NodeAPI nodeType (Just id) $ GT.asyncTaskTypePath GT.ListUpload) /\
b
odyParams
JSON -> GT.ListUpload /\ (GR.NodeAPI nodeType (Just id) $ GT.asyncTaskTypePath GT.ListUpload) /\
jsonB
odyParams
CSV -> GT.ListCSVUpload /\ (GR.NodeAPI NodeList (Just id) $ GT.asyncTaskTypePath GT.ListCSVUpload) /\ csvBodyParams
_ -> GT.UploadFile /\ (GR.NodeAPI nodeType (Just id) "") /\ bodyParams
_ -> GT.UploadFile /\ (GR.NodeAPI nodeType (Just id) "") /\ bodyParams
...
...
@@ -715,8 +719,8 @@ uploadFrameCalcViewCpt = here.component "uploadFrameCalcView" cpt
selection' /\ selectionBox
<- R2.useBox' ListSelection.MyListsFirst
let bodies = [
H.div
let bodies = [
H.div
{ className: "col-12 flex-space-around" }
[ H.h4 {}
[ H.text "This will upload current calc as Corpus CSV" ]
...
...
@@ -744,7 +748,7 @@ uploadFrameCalcViewCpt = here.component "uploadFrameCalcView" cpt
[]
]
]
,
,
-- List selection
H.div
{ className: "form-group" }
...
...
@@ -794,4 +798,3 @@ uploadFrameCalc session id lang selection = do
eTask <- postWwwUrlencoded session p body
pure $ (\task -> GT.AsyncTaskWithType { task, typ: GT.UploadFrameCalc }) <$> eTask
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