Commit 6808a0ff authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[Frame] draft implementation of importing ethercalc

parent 6e088030
Pipeline #2091 failed with stage
...@@ -10,7 +10,8 @@ import Data.Maybe (Maybe(..)) ...@@ -10,7 +10,8 @@ import Data.Maybe (Maybe(..))
import Data.Newtype (class Newtype) import Data.Newtype (class Newtype)
import Data.Nullable (Nullable, null, toMaybe) import Data.Nullable (Nullable, null, toMaybe)
import Data.Show.Generic (genericShow) import Data.Show.Generic (genericShow)
import Effect.Aff (Aff) import Effect.Aff (Aff, launchAff_)
import Effect.Class (liftEffect)
import Gargantext.Components.FolderView as FV import Gargantext.Components.FolderView as FV
import Gargantext.Components.Node (NodePoly(..)) import Gargantext.Components.Node (NodePoly(..))
import Gargantext.Config.REST (RESTError, logRESTError) import Gargantext.Config.REST (RESTError, logRESTError)
...@@ -139,8 +140,10 @@ importIntoListButtonCpt = here.component "importIntoListButton" cpt where ...@@ -139,8 +140,10 @@ importIntoListButtonCpt = here.component "importIntoListButton" cpt where
let url = base <> "/" <> frame_id let url = base <> "/" <> frame_id
--task = GT.AsyncTaskWithType { task, typ: GT.ListCSVUpload } --task = GT.AsyncTaskWithType { task, typ: GT.ListCSVUpload }
uploadPath = GR.NodeAPI NodeList (Just id) $ GT.asyncTaskTypePath GT.ListCSVUpload uploadPath = GR.NodeAPI NodeList (Just id) $ GT.asyncTaskTypePath GT.ListCSVUpload
launchAff_ $ do
-- TODO Get corpus_id
csv <- EC.downloadCSV base frame_id csv <- EC.downloadCSV base frame_id
here.log2 "[importIntoListButton] CSV: " csv liftEffect $ here.log2 "[importIntoListButton] CSV: " csv
--eTask <- postWwwUrlencoded session uploadPath body --eTask <- postWwwUrlencoded session uploadPath body
pure unit pure unit
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment