Commit 294c3bcd authored by arturo's avatar arturo

>>> continue

parent bbb84c58
Pipeline #2490 failed with stage
in 0 seconds
...@@ -11,7 +11,7 @@ import Gargantext.Components.Forest.Tree.Node.Tools (formChoiceSafe, submitButto ...@@ -11,7 +11,7 @@ import Gargantext.Components.Forest.Tree.Node.Tools (formChoiceSafe, submitButto
import Gargantext.Config.REST (RESTError, AffRESTError) import Gargantext.Config.REST (RESTError, AffRESTError)
import Gargantext.Routes as GR import Gargantext.Routes as GR
import Gargantext.Sessions (Session, post) import Gargantext.Sessions (Session, post)
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 Reactix as R import Reactix as R
...@@ -43,6 +43,7 @@ updateCpt = here.component "update" cpt where ...@@ -43,6 +43,7 @@ updateCpt = here.component "update" cpt where
cpt props@{ nodeType: Graph } _ = pure $ updateGraph props [] cpt props@{ nodeType: Graph } _ = pure $ updateGraph props []
cpt props@{ nodeType: NodeList } _ = pure $ updateNodeList props [] cpt props@{ nodeType: NodeList } _ = pure $ updateNodeList props []
cpt props@{ nodeType: NodeTexts } _ = pure $ updateTexts props [] cpt props@{ nodeType: NodeTexts } _ = pure $ updateTexts props []
cpt props@{ nodeType: Phylo } _ = pure $ updatePhylo props
cpt props@{ nodeType: _ } _ = pure $ updateOther props [] cpt props@{ nodeType: _ } _ = pure $ updateOther props []
updateDashboard :: R2.Component UpdateProps updateDashboard :: R2.Component UpdateProps
...@@ -77,6 +78,14 @@ updateGraphCpt = here.component "updateGraph" cpt where ...@@ -77,6 +78,14 @@ updateGraphCpt = here.component "updateGraph" cpt where
] ]
(submitButton (UpdateNode $ UpdateNodeParamsGraph { methodGraph: methodGraph' }) dispatch) (submitButton (UpdateNode $ UpdateNodeParamsGraph { methodGraph: methodGraph' }) dispatch)
updatePhylo :: R2.Leaf UpdateProps
updatePhylo = R2.leaf updatePhyloCpt
updatePhyloCpt :: R.Component UpdateProps
updatePhyloCpt = here.component "updatePhylo" cpt where
cpt { dispatch } _ = do
-- @WIP: no `update/` async route created for phylo update in backend
pure $ H.div {} [ H.text "hello" ]
updateNodeList :: R2.Component UpdateProps updateNodeList :: R2.Component UpdateProps
updateNodeList = R.createElement updateNodeListCpt updateNodeList = R.createElement updateNodeListCpt
updateNodeListCpt :: R.Component UpdateProps updateNodeListCpt :: R.Component UpdateProps
......
...@@ -22,4 +22,13 @@ update :: S.Session -> NodeID -> Unit -> AffRESTError (PhyloDataSet) ...@@ -22,4 +22,13 @@ update :: S.Session -> NodeID -> Unit -> AffRESTError (PhyloDataSet)
update session nodeId _ = request >>= (_ <#> parsePhyloJSONSet) >>> pure update session nodeId _ = request >>= (_ <#> parsePhyloJSONSet) >>> pure
where where
request :: AffRESTError (PhyloJSONSet) request :: AffRESTError (PhyloJSONSet)
request = S.post session (PhyloAPI nodeId) {} request = S.post session (PhyloAPI nodeId) options
options =
{ phyloProximity: 0.5
, phyloSynchrony: 0.5
, phyloQuality: 0.5
, timeUnit: 3
, clique: 5
, exportFilter: [ 3 ]
}
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