Commit 793b8ba0 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[upload] frame calc async upload

parent b5a59874
Pipeline #1686 failed with stage
in 31 seconds
...@@ -94,7 +94,7 @@ asyncTaskTTriggersMainPageReload :: GT.AsyncTaskWithType -> Boolean ...@@ -94,7 +94,7 @@ asyncTaskTTriggersMainPageReload :: GT.AsyncTaskWithType -> Boolean
asyncTaskTTriggersMainPageReload (GT.AsyncTaskWithType { typ }) = asyncTaskTriggersMainPageReload typ asyncTaskTTriggersMainPageReload (GT.AsyncTaskWithType { typ }) = asyncTaskTriggersMainPageReload typ
asyncTaskTriggersTreeReload :: GT.AsyncTaskType -> Boolean asyncTaskTriggersTreeReload :: GT.AsyncTaskType -> Boolean
asyncTaskTriggersTreeReload GT.Form = true asyncTaskTriggersTreeReload GT.CorpusFormUpload = true
asyncTaskTriggersTreeReload GT.UploadFile = true asyncTaskTriggersTreeReload GT.UploadFile = true
asyncTaskTriggersTreeReload _ = false asyncTaskTriggersTreeReload _ = false
......
...@@ -8,6 +8,11 @@ import Data.Traversable (traverse_) ...@@ -8,6 +8,11 @@ import Data.Traversable (traverse_)
import Effect (Effect) import Effect (Effect)
import Effect.Aff (Aff) import Effect.Aff (Aff)
import Effect.Class (liftEffect) import Effect.Class (liftEffect)
import Reactix as R
import Reactix.DOM.HTML as H
import Record as Record
import Toestand as T
import Gargantext.AsyncTasks as GAT import Gargantext.AsyncTasks as GAT
import Gargantext.Components.Forest.Tree.Node.Action (Action(..)) import Gargantext.Components.Forest.Tree.Node.Action (Action(..))
import Gargantext.Components.Forest.Tree.Node.Action.Add (AddNodeValue(..), addNode) import Gargantext.Components.Forest.Tree.Node.Action.Add (AddNodeValue(..), addNode)
...@@ -32,10 +37,6 @@ import Gargantext.Types as GT ...@@ -32,10 +37,6 @@ import Gargantext.Types as GT
import Gargantext.Utils.Popover as Popover import Gargantext.Utils.Popover as Popover
import Gargantext.Utils.Reactix as R2 import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Toestand as T2 import Gargantext.Utils.Toestand as T2
import Reactix as R
import Reactix.DOM.HTML as H
import Record as Record
import Toestand as T
foreign import back :: Effect Unit foreign import back :: Effect Unit
foreign import link :: String -> Effect Unit foreign import link :: String -> Effect Unit
......
...@@ -27,7 +27,7 @@ import Gargantext.Components.Forest.Tree.Node.Action.Move (moveNodeReq) ...@@ -27,7 +27,7 @@ import Gargantext.Components.Forest.Tree.Node.Action.Move (moveNodeReq)
import Gargantext.Components.Forest.Tree.Node.Action.Rename (RenameValue(..), rename) import Gargantext.Components.Forest.Tree.Node.Action.Rename (RenameValue(..), rename)
import Gargantext.Components.Forest.Tree.Node.Action.Share as Share import Gargantext.Components.Forest.Tree.Node.Action.Share as Share
import Gargantext.Components.Forest.Tree.Node.Action.Update (updateRequest) import Gargantext.Components.Forest.Tree.Node.Action.Update (updateRequest)
import Gargantext.Components.Forest.Tree.Node.Action.Upload (uploadFile, uploadArbitraryFile) import Gargantext.Components.Forest.Tree.Node.Action.Upload (uploadFile, uploadArbitraryFile, uploadFrameCalc)
import Gargantext.Components.Forest.Tree.Node.Tools.FTree (FTree, LNode(..), NTree(..), fTreeID) import Gargantext.Components.Forest.Tree.Node.Tools.FTree (FTree, LNode(..), NTree(..), fTreeID)
import Gargantext.Components.Forest.Tree.Node.Tools.SubTree.Types (SubTreeOut(..)) import Gargantext.Components.Forest.Tree.Node.Tools.SubTree.Types (SubTreeOut(..))
import Gargantext.Ends (Frontends) import Gargantext.Ends (Frontends)
...@@ -249,6 +249,12 @@ uploadArbitraryFile' mName blob p@{ tasks, tree: (NTree (LNode { id }) _) } = do ...@@ -249,6 +249,12 @@ uploadArbitraryFile' mName blob p@{ tasks, tree: (NTree (LNode { id }) _) } = do
GAT.insert id task tasks GAT.insert id task tasks
log2 "[performAction] UploadArbitraryFile, uploaded, task:" task log2 "[performAction] UploadArbitraryFile, uploaded, task:" task
uploadFrameCalc' p@{ tasks, tree: (NTree (LNode { id }) _) } = do
task <- uploadFrameCalc p.session id
liftEffect $ do
GAT.insert id task tasks
log2 "[performAction] UploadFrameCalc, uploaded, task:" task
moveNode params p@{ forestOpen, session } = traverse_ f params where moveNode params p@{ forestOpen, session } = traverse_ f params where
f (SubTreeOut { in: in', out }) = do f (SubTreeOut { in: in', out }) = do
void $ moveNodeReq p.session in' out void $ moveNodeReq p.session in' out
...@@ -278,6 +284,7 @@ performAction (AddContact params) p = addContact params p ...@@ -278,6 +284,7 @@ performAction (AddContact params) p = addContact params p
performAction (AddNode name nodeType) p = addNode' name nodeType p performAction (AddNode name nodeType) p = addNode' name nodeType p
performAction (UploadFile nodeType fileType mName contents) p = uploadFile' nodeType fileType mName contents p performAction (UploadFile nodeType fileType mName contents) p = uploadFile' nodeType fileType mName contents p
performAction (UploadArbitraryFile mName blob) p = uploadArbitraryFile' mName blob p performAction (UploadArbitraryFile mName blob) p = uploadArbitraryFile' mName blob p
performAction UploadFrameCalc p = uploadFrameCalc' p
performAction DownloadNode _ = liftEffect $ log "[performAction] DownloadNode" performAction DownloadNode _ = liftEffect $ log "[performAction] DownloadNode"
performAction (MoveNode {params}) p = moveNode params p performAction (MoveNode {params}) p = moveNode params p
performAction (MergeNode {params}) p = mergeNode params p performAction (MergeNode {params}) p = mergeNode params p
......
...@@ -5,8 +5,6 @@ import Gargantext.Prelude ...@@ -5,8 +5,6 @@ import Gargantext.Prelude
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Data.Nullable (null) import Data.Nullable (null)
import Data.Symbol (SProxy(..)) import Data.Symbol (SProxy(..))
import Data.Tuple (fst, snd)
import Data.Tuple.Nested ((/\))
import Effect (Effect) import Effect (Effect)
import Effect.Aff (Aff, launchAff) import Effect.Aff (Aff, launchAff)
import Effect.Class (liftEffect) import Effect.Class (liftEffect)
...@@ -127,7 +125,7 @@ nodeMainSpanCpt = here.component "nodeMainSpan" cpt ...@@ -127,7 +125,7 @@ nodeMainSpanCpt = here.component "nodeMainSpan" cpt
, nodeType , nodeType
, session } [] , session } []
, fileTypeView { dispatch, droppedFile, id, isDragOver, nodeType } , fileTypeView { dispatch, droppedFile, id, isDragOver, nodeType } []
, H.div {} (map (\t -> asyncProgressBar { asyncTask: t , H.div {} (map (\t -> asyncProgressBar { asyncTask: t
, barType: Pie , barType: Pie
, nodeId: id , nodeId: id
......
module Gargantext.Components.Forest.Tree.Node.Action where module Gargantext.Components.Forest.Tree.Node.Action where
import Gargantext.Prelude
import Data.Generic.Rep (class Generic) import Data.Generic.Rep (class Generic)
import Data.Eq.Generic (genericEq)
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Effect.Aff (Aff) import Effect.Aff (Aff)
import Gargantext.Prelude
import Gargantext.Components.Forest.Tree.Node.Tools.SubTree.Types (SubTreeOut, SubTreeParams(..))
import Gargantext.Components.Forest.Tree.Node.Settings (NodeAction(..), glyphiconNodeAction)
import Gargantext.Components.Forest.Tree.Node.Action.Upload.Types (FileType, UploadFileBlob)
import Gargantext.Components.Forest.Tree.Node.Action.Update.Types (UpdateNodeParams)
import Gargantext.Components.Forest.Tree.Node.Action.Contact.Types (AddContactParams) import Gargantext.Components.Forest.Tree.Node.Action.Contact.Types (AddContactParams)
import Gargantext.Components.Forest.Tree.Node.Action.Update.Types (UpdateNodeParams)
import Gargantext.Components.Forest.Tree.Node.Action.Upload.Types (FileType, UploadFileBlob)
import Gargantext.Components.Forest.Tree.Node.Settings (NodeAction(..), glyphiconNodeAction)
import Gargantext.Components.Forest.Tree.Node.Tools.SubTree.Types (SubTreeOut, SubTreeParams(..))
import Gargantext.Sessions (Session) import Gargantext.Sessions (Session)
import Gargantext.Types as GT import Gargantext.Types as GT
...@@ -30,6 +29,7 @@ data Action = AddNode String GT.NodeType ...@@ -30,6 +29,7 @@ data Action = AddNode String GT.NodeType
| DoSearch GT.AsyncTaskWithType | DoSearch GT.AsyncTaskWithType
| UploadFile GT.NodeType FileType (Maybe String) String | UploadFile GT.NodeType FileType (Maybe String) String
| UploadArbitraryFile (Maybe String) UploadFileBlob | UploadArbitraryFile (Maybe String) UploadFileBlob
| UploadFrameCalc
| DownloadNode | DownloadNode
| RefreshTree | RefreshTree
| ClosePopover | ClosePopover
...@@ -68,6 +68,7 @@ instance Eq Action where ...@@ -68,6 +68,7 @@ instance Eq Action where
eq (DoSearch at1) (DoSearch at2) = eq at1 at2 eq (DoSearch at1) (DoSearch at2) = eq at1 at2
eq (UploadFile nt1 ft1 s1 _) (UploadFile nt2 ft2 s2 _) = (eq nt1 nt2) && (eq ft1 ft2) && (eq s1 s2) eq (UploadFile nt1 ft1 s1 _) (UploadFile nt2 ft2 s2 _) = (eq nt1 nt2) && (eq ft1 ft2) && (eq s1 s2)
eq (UploadArbitraryFile s1 _) (UploadArbitraryFile s2 _) = eq s1 s2 eq (UploadArbitraryFile s1 _) (UploadArbitraryFile s2 _) = eq s1 s2
eq UploadFrameCalc UploadFrameCalc = eq true true
eq DownloadNode DownloadNode = true eq DownloadNode DownloadNode = true
eq RefreshTree RefreshTree = true eq RefreshTree RefreshTree = true
eq ClosePopover ClosePopover = true eq ClosePopover ClosePopover = true
...@@ -91,6 +92,7 @@ instance Show Action where ...@@ -91,6 +92,7 @@ instance Show Action where
show (DoSearch _ ) = "SearchQuery" show (DoSearch _ ) = "SearchQuery"
show (UploadFile _ _ _ _) = "UploadFile" show (UploadFile _ _ _ _) = "UploadFile"
show (UploadArbitraryFile _ _) = "UploadArbitraryFile" show (UploadArbitraryFile _ _) = "UploadArbitraryFile"
show UploadFrameCalc = "UploadFrameCalc"
show RefreshTree = "RefreshTree" show RefreshTree = "RefreshTree"
show ClosePopover = "ClosePopover" show ClosePopover = "ClosePopover"
show DownloadNode = "Download" show DownloadNode = "Download"
...@@ -111,6 +113,7 @@ icon (SharePublic _ ) = glyphiconNodeAction (Publish { subTreeParams ...@@ -111,6 +113,7 @@ icon (SharePublic _ ) = glyphiconNodeAction (Publish { subTreeParams
icon (DoSearch _) = glyphiconNodeAction SearchBox icon (DoSearch _) = glyphiconNodeAction SearchBox
icon (UploadFile _ _ _ _) = glyphiconNodeAction Upload icon (UploadFile _ _ _ _) = glyphiconNodeAction Upload
icon (UploadArbitraryFile _ _ ) = glyphiconNodeAction Upload icon (UploadArbitraryFile _ _ ) = glyphiconNodeAction Upload
icon UploadFrameCalc = glyphiconNodeAction Upload
icon RefreshTree = glyphiconNodeAction Refresh icon RefreshTree = glyphiconNodeAction Refresh
icon ClosePopover = glyphiconNodeAction CloseNodePopover icon ClosePopover = glyphiconNodeAction CloseNodePopover
icon DownloadNode = glyphiconNodeAction Download icon DownloadNode = glyphiconNodeAction Download
...@@ -133,6 +136,7 @@ text (SharePublic _ ) = "Publish !" ...@@ -133,6 +136,7 @@ text (SharePublic _ ) = "Publish !"
text (DoSearch _ ) = "Launch search !" text (DoSearch _ ) = "Launch search !"
text (UploadFile _ _ _ _) = "Upload File !" text (UploadFile _ _ _ _) = "Upload File !"
text (UploadArbitraryFile _ _) = "Upload arbitrary file !" text (UploadArbitraryFile _ _) = "Upload arbitrary file !"
text UploadFrameCalc = "Upload frame calc !"
text RefreshTree = "Refresh Tree !" text RefreshTree = "Refresh Tree !"
text ClosePopover = "Close Popover !" text ClosePopover = "Close Popover !"
text DownloadNode = "Download !" text DownloadNode = "Download !"
......
module Gargantext.Components.Forest.Tree.Node.Action.Upload where module Gargantext.Components.Forest.Tree.Node.Action.Upload where
import Gargantext.Prelude
import DOM.Simple.Console (log2)
import Data.Either (fromRight') import Data.Either (fromRight')
import Data.Generic.Rep (class Generic)
import Data.Eq.Generic (genericEq) import Data.Eq.Generic (genericEq)
import Data.Generic.Rep (class Generic)
import Data.Maybe (Maybe(..), fromJust, fromMaybe) import Data.Maybe (Maybe(..), fromJust, fromMaybe)
import Data.Newtype (class Newtype) import Data.Newtype (class Newtype)
import Data.String.Regex as DSR import Data.String.Regex as DSR
import Data.String.Regex.Flags as DSRF import Data.String.Regex.Flags as DSRF
import Data.Tuple (Tuple(..)) import Data.Tuple (Tuple(..))
import Data.Tuple.Nested ((/\)) import Data.Tuple.Nested ((/\))
import DOM.Simple.Console (log2)
import Effect (Effect) import Effect (Effect)
import Effect.Aff (Aff, launchAff) import Effect.Aff (Aff, launchAff)
import Effect.Class (liftEffect) import Effect.Class (liftEffect)
import Partial.Unsafe (unsafePartial, unsafeCrashWith)
import React.SyntheticEvent as E
import Reactix as R
import Reactix.DOM.HTML as H
import Toestand as T
import URI.Extra.QueryPairs as QP
-- import Web.File.Blob (Blob)
import Web.File.FileReader.Aff (readAsDataURL)
import Gargantext.Prelude
import Gargantext.Components.Forest.Tree.Node.Action (Action(..), Props) import Gargantext.Components.Forest.Tree.Node.Action (Action(..), Props)
import Gargantext.Components.Forest.Tree.Node.Action.Upload.Types (FileType(..), UploadFileBlob(..), readUFBAsText) import Gargantext.Components.Forest.Tree.Node.Action.Upload.Types (FileType(..), UploadFileBlob(..), readUFBAsText)
import Gargantext.Components.Forest.Tree.Node.Tools (fragmentPT, formChoiceSafe, panel) import Gargantext.Components.Forest.Tree.Node.Tools (fragmentPT, formChoiceSafe, panel)
import Gargantext.Components.Lang (Lang(..)) import Gargantext.Components.Lang (Lang(..))
import Gargantext.Routes as GR import Gargantext.Routes as GR
import Gargantext.Sessions (Session, postWwwUrlencoded, post) import Gargantext.Sessions (Session, postWwwUrlencoded)
import Gargantext.Types (NodeType(..), ID) import Gargantext.Types (ID, NodeType(..))
import Gargantext.Types as GT import Gargantext.Types as GT
import Gargantext.Utils.Reactix as R2 import Gargantext.Utils.Reactix as R2
import Partial.Unsafe (unsafePartial, unsafeCrashWith)
import React.SyntheticEvent as E
import Reactix as R
import Reactix.DOM.HTML as H
import Toestand as T
import URI.Extra.QueryPairs as QP
import Web.File.FileReader.Aff (readAsDataURL)
here :: R2.Here here :: R2.Here
here = R2.here "Gargantext.Components.Forest.Tree.Node.Action.Upload" here = R2.here "Gargantext.Components.Forest.Tree.Node.Action.Upload"
...@@ -50,9 +48,10 @@ actionUpload :: R2.Component ActionUpload ...@@ -50,9 +48,10 @@ actionUpload :: R2.Component ActionUpload
actionUpload = R.createElement actionUploadCpt actionUpload = R.createElement actionUploadCpt
actionUploadCpt :: R.Component ActionUpload actionUploadCpt :: R.Component ActionUpload
actionUploadCpt = here.component "actionUpload" cpt where actionUploadCpt = here.component "actionUpload" cpt where
cpt { nodeType: Corpus, dispatch, id, session } _ = pure $ uploadFileView {dispatch, id, nodeType: GT.Corpus, session} cpt props@{ nodeType: Corpus } _ = pure $ uploadFileView props []
cpt { nodeType: NodeList, dispatch, id, session } _ = pure $ uploadTermListView {dispatch, id, nodeType: GT.NodeList, session} cpt props@{ nodeType: NodeList } _ = pure $ uploadTermListView props []
cpt props@{ nodeType: _, dispatch, id, session } _ = pure $ actionUploadOther props [] cpt props@{ nodeType: NodeFrameCalc } _ = pure $ uploadFrameCalcView props []
cpt props _ = pure $ actionUploadOther props []
{- {-
actionUpload Annuaire id session dispatch = actionUpload Annuaire id session dispatch =
...@@ -85,8 +84,8 @@ type UploadFile = ...@@ -85,8 +84,8 @@ type UploadFile =
} }
uploadFileView :: Record Props -> R.Element uploadFileView :: R2.Component Props
uploadFileView props = R.createElement uploadFileViewCpt props [] uploadFileView = R.createElement uploadFileViewCpt
uploadFileViewCpt :: R.Component Props uploadFileViewCpt :: R.Component Props
uploadFileViewCpt = here.component "uploadFileView" cpt uploadFileViewCpt = here.component "uploadFileView" cpt
where where
...@@ -132,19 +131,12 @@ uploadFileViewCpt = here.component "uploadFileView" cpt ...@@ -132,19 +131,12 @@ uploadFileViewCpt = here.component "uploadFileView" cpt
let footer = H.div {} [ uploadButton { dispatch let footer = H.div {} [ uploadButton { dispatch
, fileType , fileType
, lang , lang
, id
, mFile , mFile
, nodeType , nodeType
} } []
] ]
pure $ panel bodies footer pure $ panel bodies footer
renderOptionFT :: FileType -> R.Element
renderOptionFT opt = H.option {} [ H.text $ show opt ]
renderOptionLang :: Lang -> R.Element
renderOptionLang opt = H.option {} [ H.text $ show opt ]
onChangeContents :: forall e. T.Box (Maybe UploadFile) -> E.SyntheticEvent_ e -> Effect Unit onChangeContents :: forall e. T.Box (Maybe UploadFile) -> E.SyntheticEvent_ e -> Effect Unit
onChangeContents mFile e = do onChangeContents mFile e = do
let mF = R2.inputFileNameWithBlob 0 e let mF = R2.inputFileNameWithBlob 0 e
...@@ -162,20 +154,18 @@ uploadFileViewCpt = here.component "uploadFileView" cpt ...@@ -162,20 +154,18 @@ uploadFileViewCpt = here.component "uploadFileView" cpt
type UploadButtonProps = type UploadButtonProps =
( dispatch :: Action -> Aff Unit ( dispatch :: Action -> Aff Unit
, fileType :: T.Box FileType , fileType :: T.Box FileType
, id :: GT.ID
, lang :: T.Box Lang , lang :: T.Box Lang
, mFile :: T.Box (Maybe UploadFile) , mFile :: T.Box (Maybe UploadFile)
, nodeType :: GT.NodeType , nodeType :: GT.NodeType
) )
uploadButton :: Record UploadButtonProps -> R.Element uploadButton :: R2.Component UploadButtonProps
uploadButton props = R.createElement uploadButtonCpt props [] uploadButton = R.createElement uploadButtonCpt
uploadButtonCpt :: R.Component UploadButtonProps uploadButtonCpt :: R.Component UploadButtonProps
uploadButtonCpt = here.component "uploadButton" cpt uploadButtonCpt = here.component "uploadButton" cpt
where where
cpt { dispatch cpt { dispatch
, fileType , fileType
, id
, lang , lang
, mFile , mFile
, nodeType , nodeType
...@@ -219,8 +209,8 @@ type FileTypeProps = ...@@ -219,8 +209,8 @@ type FileTypeProps =
, nodeType :: GT.NodeType , nodeType :: GT.NodeType
) )
fileTypeView :: Record FileTypeProps -> R.Element fileTypeView :: R2.Component FileTypeProps
fileTypeView p = R.createElement fileTypeViewCpt p [] fileTypeView = R.createElement fileTypeViewCpt
fileTypeViewCpt :: R.Component FileTypeProps fileTypeViewCpt :: R.Component FileTypeProps
fileTypeViewCpt = here.component "fileTypeView" cpt fileTypeViewCpt = here.component "fileTypeView" cpt
where where
...@@ -233,7 +223,7 @@ fileTypeViewCpt = here.component "fileTypeView" cpt ...@@ -233,7 +223,7 @@ fileTypeViewCpt = here.component "fileTypeView" cpt
case droppedFile' of case droppedFile' of
Nothing -> pure $ H.div {} [] Nothing -> pure $ H.div {} []
Just df@(DroppedFile { blob, fileType }) -> Just df ->
pure $ H.div tooltipProps [ H.div { className: "card"} pure $ H.div tooltipProps [ H.div { className: "card"}
[ panelHeading [ panelHeading
, panelBody df , panelBody df
...@@ -267,13 +257,13 @@ fileTypeViewCpt = here.component "fileTypeView" cpt ...@@ -267,13 +257,13 @@ fileTypeViewCpt = here.component "fileTypeView" cpt
panelBody (DroppedFile { blob }) = panelBody (DroppedFile { blob }) =
H.div {className: "card-body"} H.div {className: "card-body"}
[ R2.select {className: "col-md-12 form-control" [ R2.select {className: "col-md-12 form-control"
, on: {change: onChange blob} , on: { change: onChange blob }
} }
(map renderOption [CSV, CSV_HAL, WOS]) (map renderOption [CSV, CSV_HAL, WOS])
] ]
where where
onChange blob e l = onChange b e l =
T.write_ (Just $ DroppedFile $ { blob T.write_ (Just $ DroppedFile $ { blob: b
, fileType: read $ R.unsafeEventValue e , fileType: read $ R.unsafeEventValue e
, lang : fromMaybe EN $ read $ R.unsafeEventValue l , lang : fromMaybe EN $ read $ R.unsafeEventValue l
}) droppedFile }) droppedFile
...@@ -299,88 +289,14 @@ fileTypeViewCpt = here.component "fileTypeView" cpt ...@@ -299,88 +289,14 @@ fileTypeViewCpt = here.component "fileTypeView" cpt
} [H.text "Upload"] } [H.text "Upload"]
] ]
newtype FileUploadQuery = FileUploadQuery {
fileType :: FileType
}
derive instance Newtype FileUploadQuery _
instance GT.ToQuery FileUploadQuery where
toQuery (FileUploadQuery {fileType}) =
QP.print id id $ QP.QueryPairs $
pair "fileType" fileType
where pair :: forall a. Show a => String -> a -> Array (Tuple QP.Key (Maybe QP.Value))
pair k v = [ QP.keyFromString k /\ (Just $ QP.valueFromString $ show v) ]
uploadFile :: Session
-> GT.NodeType
-> ID
-> FileType
-> {contents :: String, mName :: Maybe String}
-> Aff GT.AsyncTaskWithType
{-
uploadFile session NodeList id JSON { mName, contents } = do
let url = GR.NodeAPI NodeList (Just id) $ GT.asyncTaskTypePath GT.ListUpload
-- { input: { data: ..., filetype: "JSON", name: "..." } }
let body = { input: { data: contents
, filetype: "JSON"
, name: fromMaybe "" mName } }
task <- post session url body
pure $ GT.AsyncTaskWithType { task, typ: GT.Form }
-}
uploadFile session nodeType id fileType { mName, contents } = do
-- contents <- readAsText blob
task <- postWwwUrlencoded session p bodyParams
pure $ GT.AsyncTaskWithType {task, typ: GT.Form}
--postMultipartFormData session p fileContents
where
p = case nodeType of
Corpus -> GR.NodeAPI nodeType (Just id) $ GT.asyncTaskTypePath GT.Form
Annuaire -> GR.NodeAPI nodeType (Just id) "annuaire"
NodeList -> case fileType of
JSON -> GR.NodeAPI nodeType (Just id) $ GT.asyncTaskTypePath GT.ListUpload
CSV -> GR.NodeAPI nodeType (Just id) $ GT.asyncTaskTypePath GT.ListCSVUpload
_ -> GR.NodeAPI nodeType (Just id) ""
_ -> GR.NodeAPI nodeType (Just id) ""
bodyParams = [ Tuple "_wf_data" (Just contents)
, Tuple "_wf_filetype" (Just $ show fileType)
, Tuple "_wf_name" mName
]
uploadArbitraryFile :: Session
-> ID
-> {blob :: UploadFileBlob, mName :: Maybe String}
-> Aff GT.AsyncTaskWithType
uploadArbitraryFile session id {mName, blob: UploadFileBlob blob} = do
contents <- readAsDataURL blob
uploadArbitraryDataURL session id mName contents
uploadArbitraryDataURL :: Session
-> ID
-> Maybe String
-> String
-> Aff GT.AsyncTaskWithType
uploadArbitraryDataURL session id mName contents' = do
let re = fromRight' (\_ -> unsafeCrashWith "Unexpected Left") $ DSR.regex "data:.*;base64," DSRF.noFlags
contents = DSR.replace re "" contents'
task <- postWwwUrlencoded session p (bodyParams contents)
pure $ GT.AsyncTaskWithType { task, typ: GT.Form }
where
p = GR.NodeAPI GT.Node (Just id) $ GT.asyncTaskTypePath GT.UploadFile
bodyParams c = [ Tuple "_wfi_b64_data" (Just c)
, Tuple "_wfi_name" mName
]
------------------------------------------------------------------------ ------------------------------------------------------------------------
uploadTermListView :: Record Props -> R.Element uploadTermListView :: R2.Component Props
uploadTermListView props = R.createElement uploadTermListViewCpt props [] uploadTermListView = R.createElement uploadTermListViewCpt
uploadTermListViewCpt :: R.Component Props uploadTermListViewCpt :: R.Component Props
uploadTermListViewCpt = here.component "uploadTermListView" cpt uploadTermListViewCpt = here.component "uploadTermListView" cpt
where where
cpt {dispatch, id, nodeType} _ = do cpt { dispatch, nodeType } _ = do
let defaultUploadType = JSON let defaultUploadType = JSON
mFile <- T.useBox (Nothing :: Maybe UploadFile) mFile <- T.useBox (Nothing :: Maybe UploadFile)
uploadType <- T.useBox defaultUploadType uploadType <- T.useBox defaultUploadType
...@@ -398,7 +314,6 @@ uploadTermListViewCpt = here.component "uploadTermListView" cpt ...@@ -398,7 +314,6 @@ uploadTermListViewCpt = here.component "uploadTermListView" cpt
, on: { change: onUploadTypeChange uploadType } } (opt <$> [ CSV, JSON ]) , on: { change: onUploadTypeChange uploadType } } (opt <$> [ CSV, JSON ])
let footer = H.div {} [ uploadTermButton { dispatch let footer = H.div {} [ uploadTermButton { dispatch
, id
, mFile , mFile
, nodeType , nodeType
, uploadType , uploadType
...@@ -435,7 +350,6 @@ uploadTermListViewCpt = here.component "uploadTermListView" cpt ...@@ -435,7 +350,6 @@ uploadTermListViewCpt = here.component "uploadTermListView" cpt
type UploadTermButtonProps = type UploadTermButtonProps =
( dispatch :: Action -> Aff Unit ( dispatch :: Action -> Aff Unit
, id :: Int
, mFile :: T.Box (Maybe UploadFile) , mFile :: T.Box (Maybe UploadFile)
, nodeType :: GT.NodeType , nodeType :: GT.NodeType
, uploadType :: T.Box FileType , uploadType :: T.Box FileType
...@@ -447,7 +361,6 @@ uploadTermButtonCpt :: R.Component UploadTermButtonProps ...@@ -447,7 +361,6 @@ uploadTermButtonCpt :: R.Component UploadTermButtonProps
uploadTermButtonCpt = here.component "uploadTermButton" cpt uploadTermButtonCpt = here.component "uploadTermButton" cpt
where where
cpt { dispatch cpt { dispatch
, id
, mFile , mFile
, nodeType , nodeType
, uploadType } _ = do , uploadType } _ = do
...@@ -473,3 +386,118 @@ uploadTermButtonCpt = here.component "uploadTermButton" cpt ...@@ -473,3 +386,118 @@ uploadTermButtonCpt = here.component "uploadTermButton" cpt
_ <- dispatch $ UploadFile nodeType uploadType' (Just name) contents _ <- dispatch $ UploadFile nodeType uploadType' (Just name) contents
liftEffect $ do liftEffect $ do
T.write_ Nothing mFile T.write_ Nothing mFile
------------------------------------------------------------------------
uploadFrameCalcView :: R2.Component Props
uploadFrameCalcView = R.createElement uploadFrameCalcViewCpt
uploadFrameCalcViewCpt :: R.Component Props
uploadFrameCalcViewCpt = here.component "uploadFrameCalcView" cpt
where
cpt { dispatch, id, nodeType, session } _ = do
let bodies =
[ R2.row
[ H.div { className: "col-12 flex-space-around" }
[ H.h4 {}
[ H.text "This will upload current calc as Corpus CSV" ]
]
]
]
let footer = H.div {}
[ H.button { className: "btn btn-primary"
, on: { click: onClick } }
[ H.text "Upload!" ]
]
pure $ panel bodies footer
where
onClick _ = do
void $ launchAff do
dispatch UploadFrameCalc
------------------------------------------------------------------------
newtype FileUploadQuery = FileUploadQuery {
fileType :: FileType
}
derive instance Newtype FileUploadQuery _
instance GT.ToQuery FileUploadQuery where
toQuery (FileUploadQuery {fileType}) =
QP.print id id $ QP.QueryPairs $
pair "fileType" fileType
where pair :: forall a. Show a => String -> a -> Array (Tuple QP.Key (Maybe QP.Value))
pair k v = [ QP.keyFromString k /\ (Just $ QP.valueFromString $ show v) ]
uploadFile :: Session
-> GT.NodeType
-> ID
-> FileType
-> {contents :: String, mName :: Maybe String}
-> Aff GT.AsyncTaskWithType
{-
uploadFile session NodeList id JSON { mName, contents } = do
let url = GR.NodeAPI NodeList (Just id) $ GT.asyncTaskTypePath GT.ListUpload
-- { input: { data: ..., filetype: "JSON", name: "..." } }
let body = { input: { data: contents
, filetype: "JSON"
, name: fromMaybe "" mName } }
task <- post session url body
pure $ GT.AsyncTaskWithType { task, typ: GT.CorpusFormUpload }
-}
uploadFile session nodeType id fileType { mName, contents } = do
-- contents <- readAsText blob
task <- postWwwUrlencoded session p bodyParams
pure $ GT.AsyncTaskWithType { task, typ: GT.CorpusFormUpload }
--postMultipartFormData session p fileContents
where
p = case nodeType of
Corpus -> GR.NodeAPI nodeType (Just id) $ GT.asyncTaskTypePath GT.CorpusFormUpload
Annuaire -> GR.NodeAPI nodeType (Just id) "annuaire"
NodeList -> case fileType of
JSON -> GR.NodeAPI nodeType (Just id) $ GT.asyncTaskTypePath GT.ListUpload
CSV -> GR.NodeAPI nodeType (Just id) $ GT.asyncTaskTypePath GT.ListCSVUpload
_ -> GR.NodeAPI nodeType (Just id) ""
NodeFrameCalc -> GR.NodeAPI nodeType (Just id) $ GT.asyncTaskTypePath GT.UploadFrameCalc
_ -> GR.NodeAPI nodeType (Just id) ""
bodyParams = [ Tuple "_wf_data" (Just contents)
, Tuple "_wf_filetype" (Just $ show fileType)
, Tuple "_wf_name" mName
]
uploadArbitraryFile :: Session
-> ID
-> {blob :: UploadFileBlob, mName :: Maybe String}
-> Aff GT.AsyncTaskWithType
uploadArbitraryFile session id {mName, blob: UploadFileBlob blob} = do
contents <- readAsDataURL blob
uploadArbitraryDataURL session id mName contents
uploadArbitraryDataURL :: Session
-> ID
-> Maybe String
-> String
-> Aff GT.AsyncTaskWithType
uploadArbitraryDataURL session id mName contents' = do
let re = fromRight' (\_ -> unsafeCrashWith "Unexpected Left") $ DSR.regex "data:.*;base64," DSRF.noFlags
contents = DSR.replace re "" contents'
task <- postWwwUrlencoded session p (bodyParams contents)
pure $ GT.AsyncTaskWithType { task, typ: GT.CorpusFormUpload }
where
p = GR.NodeAPI GT.Node (Just id) $ GT.asyncTaskTypePath GT.UploadFile
bodyParams c = [ Tuple "_wfi_b64_data" (Just c)
, Tuple "_wfi_name" mName
]
uploadFrameCalc :: Session
-> ID
-> Aff GT.AsyncTaskWithType
uploadFrameCalc session id = do
let p = GR.NodeAPI GT.Node (Just id) $ GT.asyncTaskTypePath GT.UploadFrameCalc
bodyParams = []
task <- postWwwUrlencoded session p bodyParams
pure $ GT.AsyncTaskWithType { task, typ: GT.UploadFrameCalc }
...@@ -5,7 +5,11 @@ import Gargantext.Prelude ...@@ -5,7 +5,11 @@ import Gargantext.Prelude
import Data.Array as A import Data.Array as A
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Effect.Aff (Aff) import Effect.Aff (Aff)
import Gargantext.Components.Forest.Tree.Node.Action (Action(..)) import Reactix as R
import Reactix.DOM.HTML as H
import Toestand as T
import Gargantext.Components.Forest.Tree.Node.Action (Action)
import Gargantext.Components.Forest.Tree.Node.Action.Add (NodePopup(..), addNodeView) import Gargantext.Components.Forest.Tree.Node.Action.Add (NodePopup(..), addNodeView)
import Gargantext.Components.Forest.Tree.Node.Action.Contact as Contact import Gargantext.Components.Forest.Tree.Node.Action.Contact as Contact
import Gargantext.Components.Forest.Tree.Node.Action.Delete (actionDelete) import Gargantext.Components.Forest.Tree.Node.Action.Delete (actionDelete)
...@@ -22,15 +26,12 @@ import Gargantext.Components.Forest.Tree.Node.Action.Upload (actionUpload) ...@@ -22,15 +26,12 @@ import Gargantext.Components.Forest.Tree.Node.Action.Upload (actionUpload)
import Gargantext.Components.Forest.Tree.Node.Box.Types (NodePopupProps, NodePopupS) import Gargantext.Components.Forest.Tree.Node.Box.Types (NodePopupProps, NodePopupS)
import Gargantext.Components.Forest.Tree.Node.Settings (NodeAction(..), SettingsBox(..), glyphiconNodeAction, settingsBox) import Gargantext.Components.Forest.Tree.Node.Settings (NodeAction(..), SettingsBox(..), glyphiconNodeAction, settingsBox)
import Gargantext.Components.Forest.Tree.Node.Status (Status(..), hasStatus) import Gargantext.Components.Forest.Tree.Node.Status (Status(..), hasStatus)
import Gargantext.Components.Forest.Tree.Node.Tools (textInputBox, fragmentPT, panel) import Gargantext.Components.Forest.Tree.Node.Tools (fragmentPT, textInputBox)
import Gargantext.Sessions (Session) import Gargantext.Sessions (Session)
import Gargantext.Types (Name, ID, prettyNodeType) import Gargantext.Types (Name, ID, prettyNodeType)
import Gargantext.Types as GT import Gargantext.Types as GT
import Gargantext.Utils.Glyphicon (glyphicon, glyphiconActive) import Gargantext.Utils.Glyphicon (glyphicon, glyphiconActive)
import Gargantext.Utils.Reactix as R2 import Gargantext.Utils.Reactix as R2
import Reactix as R
import Reactix.DOM.HTML as H
import Toestand as T
here :: R2.Here here :: R2.Here
here = R2.here "Gargantext.Components.Forest.Tree.Node.Box" here = R2.here "Gargantext.Components.Forest.Tree.Node.Box"
......
...@@ -327,7 +327,8 @@ settingsBox NodeFrameCalc = ...@@ -327,7 +327,8 @@ settingsBox NodeFrameCalc =
SettingsBox { show : true SettingsBox { show : true
, edit : true , edit : true
, doc : Documentation NodeFrameCalc , doc : Documentation NodeFrameCalc
, buttons : [ Add [ NodeFrameCalc , buttons : [ Upload
, Add [ NodeFrameCalc
, NodeFrameWrite , NodeFrameWrite
] ]
, Move moveFrameParameters , Move moveFrameParameters
......
module Gargantext.Components.Forest.Tree.Node.Tools.Sync where module Gargantext.Components.Forest.Tree.Node.Tools.Sync where
import Gargantext.Prelude import Gargantext.Prelude (Unit, bind, discard, pure, unit, ($), (<>), (==))
( Unit, bind, const, discard, pure, unit, ($), (<>), (==) )
import Effect.Aff (Aff, launchAff_) import Effect.Aff (Aff, launchAff_)
import Data.Tuple.Nested ((/\))
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Data.Tuple (fst)
import Effect.Class (liftEffect) import Effect.Class (liftEffect)
import Reactix.DOM.HTML as H import Reactix.DOM.HTML as H
import Reactix as R import Reactix as R
......
...@@ -12,7 +12,7 @@ module Gargantext.Components.NgramsTable.Core ...@@ -12,7 +12,7 @@ module Gargantext.Components.NgramsTable.Core
, NgramsPatch(..) , NgramsPatch(..)
, NgramsPatches , NgramsPatches
, _NgramsTable , _NgramsTable
, NgramsTerm , NgramsTerm(..)
, normNgram , normNgram
, ngramsTermText , ngramsTermText
, findNgramRoot , findNgramRoot
...@@ -23,7 +23,7 @@ module Gargantext.Components.NgramsTable.Core ...@@ -23,7 +23,7 @@ module Gargantext.Components.NgramsTable.Core
, VersionedWithCount(..) , VersionedWithCount(..)
, toVersioned , toVersioned
, VersionedNgramsPatches , VersionedNgramsPatches
, AsyncNgramsChartsUpdate , AsyncNgramsChartsUpdate(..)
, VersionedNgramsTable , VersionedNgramsTable
, VersionedWithCountNgramsTable , VersionedWithCountNgramsTable
, NgramsTablePatch , NgramsTablePatch
...@@ -103,7 +103,6 @@ import Data.List as L ...@@ -103,7 +103,6 @@ import Data.List as L
import Data.Map (Map) import Data.Map (Map)
import Data.Map as Map import Data.Map as Map
import Data.Maybe (Maybe(..), fromMaybe, fromMaybe', isJust) import Data.Maybe (Maybe(..), fromMaybe, fromMaybe', isJust)
import Data.Monoid (class Monoid)
import Data.Monoid.Additive (Additive(..)) import Data.Monoid.Additive (Additive(..))
import Data.Newtype (class Newtype) import Data.Newtype (class Newtype)
import Data.Set (Set) import Data.Set (Set)
...@@ -117,9 +116,9 @@ import Data.Symbol (SProxy(..)) ...@@ -117,9 +116,9 @@ import Data.Symbol (SProxy(..))
import Data.These (These(..)) import Data.These (These(..))
import Data.Traversable (for, traverse_, traverse) import Data.Traversable (for, traverse_, traverse)
import Data.TraversableWithIndex (traverseWithIndex) import Data.TraversableWithIndex (traverseWithIndex)
import Data.Tuple (Tuple(..), snd) import Data.Tuple (Tuple(..))
import Data.Tuple.Nested ((/\)) import Data.Tuple.Nested ((/\))
import DOM.Simple.Console (log, log2) import DOM.Simple.Console (log2)
import Effect.Aff (Aff, launchAff_) import Effect.Aff (Aff, launchAff_)
import Effect (Effect) import Effect (Effect)
import Effect.Class (liftEffect) import Effect.Class (liftEffect)
...@@ -127,25 +126,23 @@ import Effect.Exception.Unsafe (unsafeThrow) ...@@ -127,25 +126,23 @@ import Effect.Exception.Unsafe (unsafeThrow)
import Foreign as F import Foreign as F
import Foreign.Object as FO import Foreign.Object as FO
import FFI.Simple.Functions (delay) import FFI.Simple.Functions (delay)
import Reactix as R import Reactix (Component, Element, createElement) as R
import Reactix.DOM.HTML as H import Reactix.DOM.HTML as H
import Record as Record
import Partial (crashWith) import Partial (crashWith)
import Partial.Unsafe (unsafePartial) import Partial.Unsafe (unsafePartial)
import Simple.JSON as JSON import Simple.JSON as JSON
import Toestand as T import Toestand (Box, modify_, read, unequal, useBox, useLive, write_) as T
import Gargantext.Prelude import Gargantext.Prelude
import Gargantext.AsyncTasks as GAT import Gargantext.AsyncTasks as GAT
import Gargantext.Components.Table as T import Gargantext.Components.Table (initialParams) as T
import Gargantext.Components.Table.Types as T import Gargantext.Components.Table.Types (ColumnName(..), OrderByDirection(..), Params) as T
import Gargantext.Routes (SessionRoute(..)) import Gargantext.Routes (SessionRoute(..))
import Gargantext.Sessions (Session, get, post, put) import Gargantext.Sessions (Session, get, post, put)
import Gargantext.Types (AsyncTaskType(..), AsyncTaskWithType(..), CTabNgramType(..), ListId, OrderBy(..), ScoreType(..), TabSubType(..), TabType(..), TermList(..), TermSize(..)) import Gargantext.Types (AsyncTaskType(..), AsyncTaskWithType(..), CTabNgramType(..), ListId, OrderBy(..), ScoreType(..), TabSubType(..), TabType(..), TermList(..), TermSize(..))
import Gargantext.Utils.KarpRabin (indicesOfAny) import Gargantext.Utils.KarpRabin (indicesOfAny)
import Gargantext.Utils.Reactix as R2 import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Toestand as T2
here :: R2.Here here :: R2.Here
here = R2.here "Gargantext.Components.NgramsTable.Core" here = R2.here "Gargantext.Components.NgramsTable.Core"
......
...@@ -3,11 +3,9 @@ module Gargantext.Components.Nodes.Annuaire.User.Contact ...@@ -3,11 +3,9 @@ module Gargantext.Components.Nodes.Annuaire.User.Contact
, contactLayout , contactLayout
) where ) where
import Gargantext.Prelude import Gargantext.Prelude (Unit, bind, discard, pure, show, ($), (*>), (<$>), (<<<), (<>))
( Unit, bind, const, discard, pure, show, ($), (<$>), (*>), (<<<), (<>) )
import Data.Lens as L import Data.Lens as L
import Data.Maybe (Maybe(..), fromMaybe) import Data.Maybe (Maybe(..), fromMaybe)
import Data.Tuple.Nested ((/\))
import Effect (Effect) import Effect (Effect)
import Effect.Aff (Aff, launchAff_) import Effect.Aff (Aff, launchAff_)
import Effect.Class (liftEffect) import Effect.Class (liftEffect)
......
...@@ -7,7 +7,6 @@ import Data.Eq.Generic (genericEq) ...@@ -7,7 +7,6 @@ import Data.Eq.Generic (genericEq)
import Data.Show.Generic (genericShow) import Data.Show.Generic (genericShow)
import Data.List as List import Data.List as List
import Data.Maybe (Maybe(..), fromMaybe) import Data.Maybe (Maybe(..), fromMaybe)
import Data.Tuple (Tuple(..))
import DOM.Simple.Console (log2) import DOM.Simple.Console (log2)
import Effect (Effect) import Effect (Effect)
import Effect.Aff (Aff, launchAff_, throwError) import Effect.Aff (Aff, launchAff_, throwError)
......
module Gargantext.Config.REST where module Gargantext.Config.REST where
import Affjax (defaultRequest, printError, request) import Affjax (defaultRequest, printError, request)
import Affjax.RequestBody (RequestBody(..), formData, formURLEncoded, string) import Affjax.RequestBody (formData, formURLEncoded, string)
import Affjax.RequestHeader as ARH import Affjax.RequestHeader as ARH
import Affjax.ResponseFormat as ResponseFormat import Affjax.ResponseFormat as ResponseFormat
import DOM.Simple.Console (log, log2) import DOM.Simple.Console (log)
import Data.Argonaut.Core as AC import Data.Argonaut.Core as AC
import Data.Either (Either(..)) import Data.Either (Either(..))
import Data.Foldable (foldMap) import Data.Foldable (foldMap)
...@@ -12,13 +12,10 @@ import Data.FormURLEncoded as FormURLEncoded ...@@ -12,13 +12,10 @@ import Data.FormURLEncoded as FormURLEncoded
import Data.HTTP.Method (Method(..)) import Data.HTTP.Method (Method(..))
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import Data.MediaType.Common (applicationFormURLEncoded, applicationJSON, multipartFormData) import Data.MediaType.Common (applicationFormURLEncoded, applicationJSON, multipartFormData)
import Data.Tuple (Tuple(..)) import Data.Tuple (Tuple)
import DOM.Simple.Console (log2)
import Effect.Aff (Aff, throwError) import Effect.Aff (Aff, throwError)
import Effect.Class (liftEffect) import Effect.Class (liftEffect)
import Effect.Exception (error) import Effect.Exception (error)
import Milkis as Milkis
import Unsafe.Coerce (unsafeCoerce)
import Simple.JSON as JSON import Simple.JSON as JSON
import Web.XHR.FormData as XHRFormData import Web.XHR.FormData as XHRFormData
......
...@@ -650,7 +650,7 @@ modeFromString _ = Nothing ...@@ -650,7 +650,7 @@ modeFromString _ = Nothing
-- corresponds to /add/form/async or /add/query/async -- corresponds to /add/form/async or /add/query/async
data AsyncTaskType = AddNode data AsyncTaskType = AddNode
| Form -- this is file upload too | CorpusFormUpload -- this is file upload too
| GraphRecompute | GraphRecompute
| ListUpload | ListUpload
| ListCSVUpload -- legacy v3 CSV upload for lists | ListCSVUpload -- legacy v3 CSV upload for lists
...@@ -658,6 +658,7 @@ data AsyncTaskType = AddNode ...@@ -658,6 +658,7 @@ data AsyncTaskType = AddNode
| UpdateNgramsCharts | UpdateNgramsCharts
| UpdateNode | UpdateNode
| UploadFile | UploadFile
| UploadFrameCalc
derive instance Generic AsyncTaskType _ derive instance Generic AsyncTaskType _
instance JSON.ReadForeign AsyncTaskType where instance JSON.ReadForeign AsyncTaskType where
...@@ -669,7 +670,7 @@ instance Show AsyncTaskType where ...@@ -669,7 +670,7 @@ instance Show AsyncTaskType where
asyncTaskTypePath :: AsyncTaskType -> String asyncTaskTypePath :: AsyncTaskType -> String
asyncTaskTypePath AddNode = "async/nobody/" asyncTaskTypePath AddNode = "async/nobody/"
asyncTaskTypePath Form = "add/form/async/" asyncTaskTypePath CorpusFormUpload = "add/form/async/"
asyncTaskTypePath GraphRecompute = "async/recompute/" asyncTaskTypePath GraphRecompute = "async/recompute/"
asyncTaskTypePath ListUpload = "add/form/async/" asyncTaskTypePath ListUpload = "add/form/async/"
asyncTaskTypePath ListCSVUpload = "csv/add/form/async/" asyncTaskTypePath ListCSVUpload = "csv/add/form/async/"
...@@ -677,6 +678,7 @@ asyncTaskTypePath Query = "query/" ...@@ -677,6 +678,7 @@ asyncTaskTypePath Query = "query/"
asyncTaskTypePath UpdateNgramsCharts = "ngrams/async/charts/update/" asyncTaskTypePath UpdateNgramsCharts = "ngrams/async/charts/update/"
asyncTaskTypePath UpdateNode = "update/" asyncTaskTypePath UpdateNode = "update/"
asyncTaskTypePath UploadFile = "async/file/add/" asyncTaskTypePath UploadFile = "async/file/add/"
asyncTaskTypePath UploadFrameCalc = "add/framecalc/async/"
type AsyncTaskID = String type AsyncTaskID = String
......
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