Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-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
Julien Moutinho
haskell-gargantext
Commits
ac8b7192
Commit
ac8b7192
authored
Jan 10, 2023
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/481-dev-node-calc-upload' into dev
parents
0b878bb2
a0f81fbf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
FrameCalcUpload.hs
src/Gargantext/API/Node/FrameCalcUpload.hs
+8
-4
No files found.
src/Gargantext/API/Node/FrameCalcUpload.hs
View file @
ac8b7192
...
...
@@ -24,7 +24,7 @@ import Gargantext.API.Node.Corpus.New.Types (FileFormat(..), FileType(..))
import
Gargantext.API.Node.Types
(
NewWithForm
(
..
))
import
Gargantext.API.Prelude
import
Gargantext.Core.Types.Individu
(
User
(
..
))
import
Gargantext.Core.Text.List.Social
(
FlowSocialListWith
(
..
)
,
FlowSocialListPriority
(
..
)
)
import
Gargantext.Core.Text.List.Social
(
FlowSocialListWith
(
..
))
import
Gargantext.Database.Action.Flow.Types
import
Gargantext.Database.Admin.Types.Hyperdata.Frame
import
Gargantext.Database.Admin.Types.Node
...
...
@@ -33,8 +33,12 @@ import Gargantext.Database.Query.Table.Node (getClosestParentIdByType, getNodeWi
import
Gargantext.Database.Schema.Node
(
node_hyperdata
)
import
Gargantext.Prelude
import
Gargantext.Utils.Jobs
(
serveJobsAPI
)
import
Gargantext.Core
(
Lang
)
data
FrameCalcUpload
=
FrameCalcUpload
()
data
FrameCalcUpload
=
FrameCalcUpload
{
_wf_lang
::
!
(
Maybe
Lang
)
,
_wf_selection
::
!
FlowSocialListWith
}
deriving
(
Generic
)
instance
FromForm
FrameCalcUpload
...
...
@@ -62,7 +66,7 @@ frameCalcUploadAsync :: (HasConfig env, FlowCmdM env err m)
->
(
JobLog
->
m
()
)
->
JobLog
->
m
JobLog
frameCalcUploadAsync
uId
nId
_f
logStatus
jobLog
=
do
frameCalcUploadAsync
uId
nId
(
FrameCalcUpload
_wf_lang
_wf_selection
)
logStatus
jobLog
=
do
logStatus
jobLog
-- printDebug "[frameCalcUploadAsync] uId" uId
...
...
@@ -88,6 +92,6 @@ frameCalcUploadAsync uId nId _f logStatus jobLog = do
jobLog2
<-
case
mCId
of
Nothing
->
pure
$
jobLogFail
jobLog
Just
cId
->
addToCorpusWithForm
(
RootId
(
NodeId
uId
))
cId
(
NewWithForm
CSV
Plain
body
Nothing
"calc-upload.csv"
(
FlowSocialListWithPriority
MySelfFirst
)
)
logStatus
jobLog
addToCorpusWithForm
(
RootId
(
NodeId
uId
))
cId
(
NewWithForm
CSV
Plain
body
_wf_lang
"calc-upload.csv"
_wf_selection
)
logStatus
jobLog
pure
$
jobLogSuccess
jobLog2
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