Commit d58c3981 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

Merge branch 'dev' into 294-dev-test

parents 56057252 c039b417
Pipeline #1540 passed with stage
in 5 minutes and 7 seconds
...@@ -48,6 +48,7 @@ type Props = ...@@ -48,6 +48,7 @@ type Props =
, session :: Session , session :: Session
, backFolder :: Boolean , backFolder :: Boolean
, tasks :: T.Box GAT.Storage , tasks :: T.Box GAT.Storage
, reloadForest :: T.Box T2.Reload
) )
data FolderStyle = FolderUp | FolderChild data FolderStyle = FolderUp | FolderChild
...@@ -57,12 +58,12 @@ folderView props = R.createElement folderViewCpt props [] ...@@ -57,12 +58,12 @@ folderView props = R.createElement folderViewCpt props []
folderViewCpt :: R.Component Props folderViewCpt :: R.Component Props
folderViewCpt = here.component "folderViewCpt" cpt where folderViewCpt = here.component "folderViewCpt" cpt where
cpt {nodeId, session, backFolder, tasks} _ = do cpt {nodeId, session, backFolder, tasks, reloadForest} _ = do
setPopoverRef <- R.useRef Nothing setPopoverRef <- R.useRef Nothing
reload <- T.useBox T2.newReload reload <- T.useBox T2.newReload
reload' <- T.useLive T.unequal reload reload' <- T.useLive T.unequal reload
useLoader { nodeId, session, reload: reload'} loadFolders $ useLoader { nodeId, session, reload: reload'} loadFolders $
\folders -> folderViewMain {folders, nodeId, session, backFolder, tasks, reload, setPopoverRef} \folders -> folderViewMain {folders, nodeId, session, backFolder, tasks, reload, setPopoverRef, reloadForest}
type FolderViewProps = type FolderViewProps =
( (
...@@ -72,6 +73,7 @@ type FolderViewProps = ...@@ -72,6 +73,7 @@ type FolderViewProps =
, backFolder :: Boolean , backFolder :: Boolean
, tasks :: T.Box GAT.Storage , tasks :: T.Box GAT.Storage
, reload :: T.Box T2.Reload , reload :: T.Box T2.Reload
, reloadForest :: T.Box T2.Reload
, setPopoverRef :: R.Ref (Maybe (Boolean -> Effect Unit)) , setPopoverRef :: R.Ref (Maybe (Boolean -> Effect Unit))
) )
...@@ -80,11 +82,11 @@ folderViewMain props = R.createElement folderViewMainCpt props [] ...@@ -80,11 +82,11 @@ folderViewMain props = R.createElement folderViewMainCpt props []
folderViewMainCpt :: R.Component FolderViewProps folderViewMainCpt :: R.Component FolderViewProps
folderViewMainCpt = here.component "folderViewMainCpt" cpt where folderViewMainCpt = here.component "folderViewMainCpt" cpt where
cpt {nodeId, session, backFolder, tasks, setPopoverRef, reload, folders: tree@(NTree (LNode {parent_id: parentId, nodeType}) (folders))} _ = do cpt {nodeId, session, backFolder, tasks, setPopoverRef, reload, reloadForest, folders: tree@(NTree (LNode {parent_id: parentId, nodeType}) (folders))} _ = do
let foldersS = A.sortBy sortFolders folders let foldersS = A.sortBy sortFolders folders
let backHome = isBackHome nodeType let backHome = isBackHome nodeType
let parent = makeParentFolder parentId session backFolder backHome let parent = makeParentFolder parentId session backFolder backHome
let children = makeFolderElements foldersS {session, setPopoverRef, nodeId, tasks, reload} let children = makeFolderElements foldersS {session, setPopoverRef, nodeId, tasks, reload, reloadForest}
pure $ H.div {className: "fv folders"} $ parent <> children pure $ H.div {className: "fv folders"} $ parent <> children
...@@ -98,7 +100,8 @@ folderViewMainCpt = here.component "folderViewMainCpt" cpt where ...@@ -98,7 +100,8 @@ folderViewMainCpt = here.component "folderViewMainCpt" cpt where
, setPopoverRef: props.setPopoverRef , setPopoverRef: props.setPopoverRef
, parentId: props.nodeId , parentId: props.nodeId
, tasks: props.tasks , tasks: props.tasks
, reload: props.reload} [] , reload: props.reload
, reloadForest: props.reloadForest} []
makeParentFolder :: Maybe Int -> Session -> Boolean -> Boolean -> Array R.Element makeParentFolder :: Maybe Int -> Session -> Boolean -> Boolean -> Array R.Element
makeParentFolder (Just parentId) session _ _ = makeParentFolder (Just parentId) session _ _ =
...@@ -159,6 +162,7 @@ type FolderProps = ...@@ -159,6 +162,7 @@ type FolderProps =
, parentId :: Int , parentId :: Int
, tasks :: T.Box GAT.Storage , tasks :: T.Box GAT.Storage
, reload :: T.Box T2.Reload , reload :: T.Box T2.Reload
, reloadForest :: T.Box T2.Reload
| FolderSimpleProps | FolderSimpleProps
) )
...@@ -167,9 +171,9 @@ folder = R.createElement folderCpt ...@@ -167,9 +171,9 @@ folder = R.createElement folderCpt
folderCpt :: R.Component FolderProps folderCpt :: R.Component FolderProps
folderCpt = here.component "folderCpt" cpt where folderCpt = here.component "folderCpt" cpt where
cpt props@{style, text, nodeId, session, nodeType, setPopoverRef, parentId, tasks, reload} _ = do cpt props@{style, text, nodeId, session, nodeType, setPopoverRef, parentId, tasks, reload, reloadForest} _ = do
let sid = sessionId session let sid = sessionId session
let dispatch a = performAction a {setPopoverRef, session, nodeId, parentId, tasks, reload} let dispatch a = performAction a {setPopoverRef, session, nodeId, parentId, tasks, reload, reloadForest}
popoverRef <- R.useRef null popoverRef <- R.useRef null
R.useEffect' $ do R.useEffect' $ do
...@@ -253,6 +257,7 @@ type PerformActionProps = ...@@ -253,6 +257,7 @@ type PerformActionProps =
, parentId :: Int , parentId :: Int
, tasks :: T.Box GAT.Storage , tasks :: T.Box GAT.Storage
, reload :: T.Box T2.Reload , reload :: T.Box T2.Reload
, reloadForest :: T.Box T2.Reload
) )
performAction :: Action -> Record PerformActionProps -> Aff Unit performAction :: Action -> Record PerformActionProps -> Aff Unit
...@@ -280,6 +285,7 @@ performAction = performAction' where ...@@ -280,6 +285,7 @@ performAction = performAction' where
refreshFolders p = do refreshFolders p = do
liftEffect $ T2.reload p.reload liftEffect $ T2.reload p.reload
liftEffect $ T2.reload p.reloadForest
closePopover p closePopover p
deleteNode' nt p@{ nodeId: id, parentId: parent_id } = do deleteNode' nt p@{ nodeId: id, parentId: parent_id } = do
......
...@@ -185,6 +185,7 @@ settingsBox Corpus = ...@@ -185,6 +185,7 @@ settingsBox Corpus =
, Dashboard , Dashboard
, NodeFrameWrite , NodeFrameWrite
, NodeFrameCalc , NodeFrameCalc
, Phylo
] ]
, Link (linkParams Annuaire) , Link (linkParams Annuaire)
, Move moveParameters , Move moveParameters
......
...@@ -302,22 +302,24 @@ sigmaSettings = ...@@ -302,22 +302,24 @@ sigmaSettings =
} }
type ForceAtlas2Settings = type ForceAtlas2Settings =
( adjustSizes :: Boolean ( adjustSizes :: Boolean
, barnesHutOptimize :: Boolean , barnesHutOptimize :: Boolean
-- , barnesHutTheta :: Number -- , barnesHutTheta :: Number
, edgeWeightInfluence :: Number , edgeWeightInfluence :: Number
-- , fixedY :: Boolean -- , fixedY :: Boolean
, gravity :: Number , gravity :: Number
, iterationsPerRender :: Number , includeHiddenEdges :: Boolean
, linLogMode :: Boolean , includeHiddenNodes :: Boolean
, iterationsPerRender :: Number
, linLogMode :: Boolean
, outboundAttractionDistribution :: Boolean , outboundAttractionDistribution :: Boolean
, scalingRatio :: Number , scalingRatio :: Number
, skipHidden :: Boolean , skipHidden :: Boolean
, slowDown :: Number , slowDown :: Number
, startingIterations :: Number , startingIterations :: Number
, strongGravityMode :: Boolean , strongGravityMode :: Boolean
-- , timeout :: Number -- , timeout :: Number
-- , worker :: Boolean -- , worker :: Boolean
) )
forceAtlas2Settings :: {|ForceAtlas2Settings} forceAtlas2Settings :: {|ForceAtlas2Settings}
...@@ -327,6 +329,8 @@ forceAtlas2Settings = ...@@ -327,6 +329,8 @@ forceAtlas2Settings =
, edgeWeightInfluence : 1.0 , edgeWeightInfluence : 1.0
-- fixedY : false -- fixedY : false
, gravity : 0.01 , gravity : 0.01
, includeHiddenEdges: false
, includeHiddenNodes: true
, iterationsPerRender : 50.0 -- 10.0 , iterationsPerRender : 50.0 -- 10.0
, linLogMode : false -- false , linLogMode : false -- false
, outboundAttractionDistribution: false , outboundAttractionDistribution: false
......
...@@ -20,7 +20,7 @@ import Gargantext.Components.Graph as Graph ...@@ -20,7 +20,7 @@ import Gargantext.Components.Graph as Graph
import Gargantext.Components.GraphExplorer.Button (centerButton, cameraButton) import Gargantext.Components.GraphExplorer.Button (centerButton, cameraButton)
import Gargantext.Components.GraphExplorer.RangeControl (edgeConfluenceControl, edgeWeightControl, nodeSizeControl) import Gargantext.Components.GraphExplorer.RangeControl (edgeConfluenceControl, edgeWeightControl, nodeSizeControl)
import Gargantext.Components.GraphExplorer.SlideButton (labelSizeButton, mouseSelectorSizeButton) import Gargantext.Components.GraphExplorer.SlideButton (labelSizeButton, mouseSelectorSizeButton)
import Gargantext.Components.GraphExplorer.ToggleButton (multiSelectEnabledButton, edgesToggleButton, louvainToggleButton, pauseForceAtlasButton) import Gargantext.Components.GraphExplorer.ToggleButton (multiSelectEnabledButton, edgesToggleButton, louvainToggleButton, pauseForceAtlasButton, resetForceAtlasButton)
import Gargantext.Components.GraphExplorer.Sidebar.Types as GEST import Gargantext.Components.GraphExplorer.Sidebar.Types as GEST
import Gargantext.Components.GraphExplorer.Types as GET import Gargantext.Components.GraphExplorer.Types as GET
import Gargantext.Hooks.Sigmax as Sigmax import Gargantext.Hooks.Sigmax as Sigmax
...@@ -108,11 +108,12 @@ controlsCpt = here.component "controls" cpt ...@@ -108,11 +108,12 @@ controlsCpt = here.component "controls" cpt
_ -> pure unit _ -> pure unit
-- Handle case when FA is paused from outside events, eg. the automatic timer. -- Handle case when FA is paused from outside events, eg. the automatic timer.
R.useEffect' $ Sigmax.handleForceAtlas2Pause sigmaRef forceAtlasState mFAPauseRef R.useEffect' $ Sigmax.handleForceAtlas2Pause sigmaRef forceAtlasState mFAPauseRef Graph.forceAtlas2Settings
-- Handle automatic edge hiding when FA is running (to prevent flickering). -- Handle automatic edge hiding when FA is running (to prevent flickering).
R.useEffect2' sigmaRef forceAtlasState' $ do -- TODO Commented temporarily: this breaks forceatlas rendering after reset
T.modify_ (SigmaxT.forceAtlasEdgeState forceAtlasState') showEdges -- R.useEffect2' sigmaRef forceAtlasState' $ do
-- T.modify_ (SigmaxT.forceAtlasEdgeState forceAtlasState') showEdges
-- Automatic opening of sidebar when a node is selected (but only first time). -- Automatic opening of sidebar when a node is selected (but only first time).
R.useEffect' $ do R.useEffect' $ do
...@@ -162,6 +163,7 @@ controlsCpt = here.component "controls" cpt ...@@ -162,6 +163,7 @@ controlsCpt = here.component "controls" cpt
[ RH.ul { className: "navbar-nav mx-auto" } [ RH.ul { className: "navbar-nav mx-auto" }
[ -- change type button (?) [ -- change type button (?)
navItem [ centerButton sigmaRef ] navItem [ centerButton sigmaRef ]
, navItem [ resetForceAtlasButton { forceAtlasState, sigmaRef } [] ]
, navItem [ pauseForceAtlasButton { state: forceAtlasState } [] ] , navItem [ pauseForceAtlasButton { state: forceAtlasState } [] ]
, navItem [ edgesToggleButton { state: showEdges } [] ] , navItem [ edgesToggleButton { state: showEdges } [] ]
, navItem [ louvainToggleButton { state: showLouvain } [] ] , navItem [ louvainToggleButton { state: showLouvain } [] ]
......
...@@ -8,19 +8,22 @@ module Gargantext.Components.GraphExplorer.ToggleButton ...@@ -8,19 +8,22 @@ module Gargantext.Components.GraphExplorer.ToggleButton
, multiSelectEnabledButton , multiSelectEnabledButton
, sidebarToggleButton , sidebarToggleButton
, pauseForceAtlasButton , pauseForceAtlasButton
, resetForceAtlasButton
, treeToggleButton , treeToggleButton
) where ) where
import Prelude import Prelude
import Effect (Effect) import Effect (Effect)
import Reactix as R import Gargantext.Components.Graph as Graph
import Reactix.DOM.HTML as H import Gargantext.Hooks.Sigmax as Sigmax
import Toestand as T import Gargantext.Hooks.Sigmax.Sigma as Sigma
import Gargantext.Hooks.Sigmax.Types as SigmaxTypes import Gargantext.Hooks.Sigmax.Types as SigmaxTypes
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.DOM.HTML as H
import Toestand as T
here :: R2.Here here :: R2.Here
here = R2.here "Gargantext.Components.GraphExplorer.ToggleButton" here = R2.here "Gargantext.Components.GraphExplorer.ToggleButton"
...@@ -156,9 +159,33 @@ pauseForceAtlasButtonCpt = here.component "forceAtlasToggleButton" cpt ...@@ -156,9 +159,33 @@ pauseForceAtlasButtonCpt = here.component "forceAtlasToggleButton" cpt
text SigmaxTypes.InitialStopped = "Start Force Atlas" text SigmaxTypes.InitialStopped = "Start Force Atlas"
text SigmaxTypes.Running = "Pause Force Atlas" text SigmaxTypes.Running = "Pause Force Atlas"
text SigmaxTypes.Paused = "Start Force Atlas" text SigmaxTypes.Paused = "Start Force Atlas"
text SigmaxTypes.Killed = "Start Force Atlas"
onClick state _ = T.modify_ SigmaxTypes.toggleForceAtlasState state onClick state _ = T.modify_ SigmaxTypes.toggleForceAtlasState state
type ResetForceAtlasProps = (
forceAtlasState :: T.Box SigmaxTypes.ForceAtlasState
, sigmaRef :: R.Ref Sigmax.Sigma
)
resetForceAtlasButton :: R2.Component ResetForceAtlasProps
resetForceAtlasButton = R.createElement resetForceAtlasButtonCpt
resetForceAtlasButtonCpt :: R.Component ResetForceAtlasProps
resetForceAtlasButtonCpt = here.component "resetForceAtlasToggleButton" cpt
where
cpt { forceAtlasState, sigmaRef } _ = do
pure $ H.button { className: "btn btn-outline-primary"
, on: { click: onClick forceAtlasState sigmaRef }
} [ R2.small {} [ H.text "Reset Force Atlas" ] ]
onClick forceAtlasState sigmaRef _ = do
-- TODO Sigma.killForceAtlas2 sigma
-- startForceAtlas2 sigma
Sigmax.dependOnSigma (R.readRef sigmaRef) "[resetForceAtlasButton] no sigma" $ \sigma -> do
Sigma.killForceAtlas2 sigma
Sigma.refreshForceAtlas sigma Graph.forceAtlas2Settings
T.write_ SigmaxTypes.Killed forceAtlasState
type TreeToggleButtonProps = ( type TreeToggleButtonProps = (
state :: T.Box Boolean state :: T.Box Boolean
) )
......
...@@ -15,9 +15,9 @@ import Effect (Effect) ...@@ -15,9 +15,9 @@ import Effect (Effect)
import Effect.Aff (Aff, launchAff_, throwError) import Effect.Aff (Aff, launchAff_, throwError)
import Effect.Class (liftEffect) import Effect.Class (liftEffect)
import Effect.Exception (error) import Effect.Exception (error)
import Gargantext.AsyncTasks as GAT
import Gargantext.Components.CodeEditor as CE import Gargantext.Components.CodeEditor as CE
import Gargantext.Components.FolderView as FV import Gargantext.Components.FolderView as FV
import Gargantext.AsyncTasks as GAT
import Gargantext.Components.InputWithEnter (inputWithEnter) import Gargantext.Components.InputWithEnter (inputWithEnter)
import Gargantext.Components.Node (NodePoly(..), HyperdataList) import Gargantext.Components.Node (NodePoly(..), HyperdataList)
import Gargantext.Components.Nodes.Corpus.Types (CorpusData, Hyperdata(..)) import Gargantext.Components.Nodes.Corpus.Types (CorpusData, Hyperdata(..))
...@@ -38,15 +38,15 @@ import Toestand as T ...@@ -38,15 +38,15 @@ import Toestand as T
here :: R2.Here here :: R2.Here
here = R2.here "Gargantext.Components.Nodes.Corpus" here = R2.here "Gargantext.Components.Nodes.Corpus"
type Props = ( nodeId :: Int, session :: Session, tasks :: T.Box GAT.Storage ) type Props = ( nodeId :: Int, session :: Session, tasks :: T.Box GAT.Storage, reloadForest :: T2.ReloadS )
corpusLayout :: R2.Leaf Props corpusLayout :: R2.Leaf Props
corpusLayout props = R.createElement corpusLayoutCpt props [] corpusLayout props = R.createElement corpusLayoutCpt props []
corpusLayoutCpt :: R.Component Props corpusLayoutCpt :: R.Component Props
corpusLayoutCpt = here.component "corpusLayout" cpt where corpusLayoutCpt = here.component "corpusLayout" cpt where
cpt { nodeId, session, tasks } _ = do cpt { nodeId, session, tasks, reloadForest } _ = do
pure $ corpusLayoutMain { key, nodeId, session, tasks } pure $ corpusLayoutMain { key, nodeId, session, tasks, reloadForest }
where where
key = show (sessionId session) <> "-" <> show nodeId key = show (sessionId session) <> "-" <> show nodeId
...@@ -55,6 +55,7 @@ type KeyProps = ...@@ -55,6 +55,7 @@ type KeyProps =
, key :: String , key :: String
, session :: Session , session :: Session
, tasks :: T.Box GAT.Storage , tasks :: T.Box GAT.Storage
, reloadForest :: T2.ReloadS
) )
corpusLayoutMain :: R2.Leaf KeyProps corpusLayoutMain :: R2.Leaf KeyProps
...@@ -63,7 +64,7 @@ corpusLayoutMain props = R.createElement corpusLayoutMainCpt props [] ...@@ -63,7 +64,7 @@ corpusLayoutMain props = R.createElement corpusLayoutMainCpt props []
corpusLayoutMainCpt :: R.Component KeyProps corpusLayoutMainCpt :: R.Component KeyProps
corpusLayoutMainCpt = here.component "corpusLayoutMain" cpt corpusLayoutMainCpt = here.component "corpusLayoutMain" cpt
where where
cpt { nodeId, key, session, tasks } _ = do cpt { nodeId, key, session, tasks, reloadForest } _ = do
viewType <- T.useBox Folders viewType <- T.useBox Folders
pure $ H.div {} [ pure $ H.div {} [
...@@ -73,7 +74,7 @@ corpusLayoutMainCpt = here.component "corpusLayoutMain" cpt ...@@ -73,7 +74,7 @@ corpusLayoutMainCpt = here.component "corpusLayoutMain" cpt
, H.div { className: "col-1" } [ FV.homeButton ] , H.div { className: "col-1" } [ FV.homeButton ]
] ]
] ]
, H.div {} [corpusLayoutSelection {state: viewType, key, session, nodeId, tasks}] , H.div {} [corpusLayoutSelection {state: viewType, key, session, nodeId, tasks, reloadForest}]
] ]
type SelectionProps = type SelectionProps =
...@@ -82,6 +83,7 @@ type SelectionProps = ...@@ -82,6 +83,7 @@ type SelectionProps =
, session :: Session , session :: Session
, state :: T.Box ViewType , state :: T.Box ViewType
, tasks :: T.Box GAT.Storage , tasks :: T.Box GAT.Storage
, reloadForest :: T2.ReloadS
) )
corpusLayoutSelection :: R2.Leaf SelectionProps corpusLayoutSelection :: R2.Leaf SelectionProps
...@@ -89,14 +91,14 @@ corpusLayoutSelection props = R.createElement corpusLayoutSelectionCpt props [] ...@@ -89,14 +91,14 @@ corpusLayoutSelection props = R.createElement corpusLayoutSelectionCpt props []
corpusLayoutSelectionCpt :: R.Component SelectionProps corpusLayoutSelectionCpt :: R.Component SelectionProps
corpusLayoutSelectionCpt = here.component "corpusLayoutSelection" cpt where corpusLayoutSelectionCpt = here.component "corpusLayoutSelection" cpt where
cpt { nodeId, session, key, state, tasks} _ = do cpt { nodeId, session, key, state, tasks, reloadForest} _ = do
state' <- T.useLive T.unequal state state' <- T.useLive T.unequal state
viewType <- T.read state viewType <- T.read state
pure $ renderContent viewType nodeId session key tasks pure $ renderContent viewType nodeId session key tasks reloadForest
renderContent Folders nodeId session key tasks = FV.folderView { nodeId, session, backFolder: true, tasks } renderContent Folders nodeId session key tasks reloadForest = FV.folderView { nodeId, session, backFolder: true, tasks, reloadForest }
renderContent Code nodeId session key tasks = corpusLayoutWithKey { key, nodeId, session } renderContent Code nodeId session key tasks _ = corpusLayoutWithKey { key, nodeId, session }
type CorpusKeyProps = type CorpusKeyProps =
( nodeId :: Int ( nodeId :: Int
......
module Gargantext.Components.Nodes.Corpus.Phylo where
import Gargantext.Prelude
( pure, ($) )
-- import Gargantext.Utils.Toestand as T2
-- import Toestand as T
import Data.Tuple.Nested ((/\))
import Effect (Effect)
import Gargantext.Sessions (Session)
import Gargantext.Types (NodeID)
import Gargantext.Utils.Reactix as R2
import Reactix as R
import Reactix.DOM.HTML as H
here :: R2.Here
here = R2.here "Gargantext.Components.Nodes.Corpus.Phylo"
type Props = ( nodeId :: NodeID, session :: Session )
phyloLayout :: R2.Component Props
phyloLayout = R.createElement phyloLayoutCpt
phyloLayoutCpt :: R.Component Props
phyloLayoutCpt = here.component "phyloLayout" cpt where
cpt { nodeId, session } content = do
pure $ H.h1 {} [ H.text "Hello Phylo" ]
...@@ -24,6 +24,7 @@ import Reactix as R ...@@ -24,6 +24,7 @@ import Reactix as R
import Reactix.DOM.HTML as H import Reactix.DOM.HTML as H
import Routing.Hash (setHash) import Routing.Hash (setHash)
import Toestand as T import Toestand as T
import Gargantext.Utils.Toestand as T2
here :: R2.Here here :: R2.Here
here = R2.here "Gargantext.Components.Nodes.Home" here = R2.here "Gargantext.Components.Nodes.Home"
...@@ -59,6 +60,7 @@ type HomeProps s l = ...@@ -59,6 +60,7 @@ type HomeProps s l =
, sessions :: s , sessions :: s
, showLogin :: l , showLogin :: l
, tasks :: T.Box GAT.Storage , tasks :: T.Box GAT.Storage
, reloadForest :: T.Box T2.Reload
) )
homeLayout :: forall s l. T.Read s Sessions => T.ReadWrite l Boolean homeLayout :: forall s l. T.Read s Sessions => T.ReadWrite l Boolean
...@@ -68,7 +70,7 @@ homeLayoutCpt :: forall s l. T.Read s Sessions => T.ReadWrite l Boolean ...@@ -68,7 +70,7 @@ homeLayoutCpt :: forall s l. T.Read s Sessions => T.ReadWrite l Boolean
=> R.Component (HomeProps s l) => R.Component (HomeProps s l)
homeLayoutCpt = here.component "homeLayout" cpt homeLayoutCpt = here.component "homeLayout" cpt
where where
cpt { backend, lang, sessions, showLogin, tasks} _ = do cpt { backend, lang, sessions, showLogin, tasks, reloadForest} _ = do
backend' <- T.useLive T.unequal backend backend' <- T.useLive T.unequal backend
sessions' <- T.useLive T.unequal sessions sessions' <- T.useLive T.unequal sessions
let landingData = langLandingData lang let landingData = langLandingData lang
...@@ -77,7 +79,7 @@ homeLayoutCpt = here.component "homeLayout" cpt ...@@ -77,7 +79,7 @@ homeLayoutCpt = here.component "homeLayout" cpt
[ H.div { className: "home-title container1" } [ H.div { className: "home-title container1" }
[ jumboTitle landingData ] [ jumboTitle landingData ]
, H.div { className: "home-research-form container1" } [] -- TODO , H.div { className: "home-research-form container1" } [] -- TODO
, joinButtonOrTutorial tasks sessions' (click backend') , joinButtonOrTutorial tasks reloadForest sessions' (click backend')
, H.div { className: "home-public container1" } , H.div { className: "home-public container1" }
[ renderPublic { } [ renderPublic { }
, H.div { className:"col-12 d-flex justify-content-center" } , H.div { className:"col-12 d-flex justify-content-center" }
...@@ -98,11 +100,11 @@ homeLayoutCpt = here.component "homeLayout" cpt ...@@ -98,11 +100,11 @@ homeLayoutCpt = here.component "homeLayout" cpt
T.write_ true showLogin T.write_ true showLogin
Just b -> T.write_ true showLogin Just b -> T.write_ true showLogin
joinButtonOrTutorial :: forall e. T.Box GAT.Storage -> Sessions -> (e -> Effect Unit) -> R.Element joinButtonOrTutorial :: forall e. T.Box GAT.Storage -> T2.ReloadS -> Sessions -> (e -> Effect Unit) -> R.Element
joinButtonOrTutorial tasks sessions click = joinButtonOrTutorial tasks reloadForest sessions click =
if Sessions.null sessions if Sessions.null sessions
then joinButton click then joinButton click
else tutorial {tasks, sessions: Sessions.unSessions sessions} else tutorial {tasks, reloadForest, sessions: Sessions.unSessions sessions}
joinButton :: forall e. (e -> Effect Unit) -> R.Element joinButton :: forall e. (e -> Effect Unit) -> R.Element
joinButton click = joinButton click =
...@@ -110,10 +112,10 @@ joinButton click = ...@@ -110,10 +112,10 @@ joinButton click =
-- form { backend, sessions, visible } -- form { backend, sessions, visible }
H.div { className: divClass H.div { className: divClass
, style: { paddingTop: "100px", paddingBottom: "100px" } } , style: { paddingTop: "100px", paddingBottom: "100px" } }
[ H.button { className: buttonClass, title, on: { click } } [ H.text "Join" ] ] where [ H.button { className: buttonClass, title, on: { click } } [ H.text "Log in" ] ] where
title = "Connect to the server" title = "Connect to the server"
divClass = "flex-space-around d-flex justify-content-center" divClass = "flex-space-around d-flex justify-content-center"
buttonClass = "btn btn-primary my-2" buttonClass = "btn btn-primary btn-lg btn-block"
incompatible :: String incompatible :: String
incompatible = incompatible =
...@@ -134,9 +136,9 @@ data Tuto = Tuto { title :: String, id :: String, text :: String } ...@@ -134,9 +136,9 @@ data Tuto = Tuto { title :: String, id :: String, text :: String }
summary :: R.Element summary :: R.Element
summary = summary =
H.div {} H.div {}
[ H.h3 {} [ H.text "Tutorial summary"] [ H.h3 {} [ H.text "Summary"]
, H.ol {} , H.ol {}
[ sum "Getting Started (beginners)" startTutos "alert-info" [ sum "Getting Started for beginners" startTutos "alert-info"
-- , sum "How to play (advanced users)?" playTutos "alert-warning" -- , sum "How to play (advanced users)?" playTutos "alert-warning"
-- , sum "How to master (expert users)?" expertTutos "alert-danger" -- , sum "How to master (expert users)?" expertTutos "alert-danger"
]] ]]
...@@ -148,21 +150,20 @@ summary = ...@@ -148,21 +150,20 @@ summary =
, H.ol {} (map toSummary tutos) ] ] , H.ol {} (map toSummary tutos) ] ]
toSummary (Tuto x) = H.li {} [ H.a {href: "#" <> x.id} [ H.text x.title ]] toSummary (Tuto x) = H.li {} [ H.a {href: "#" <> x.id} [ H.text x.title ]]
tutorial :: R2.Leaf (sessions :: Array Session, tasks :: T.Box GAT.Storage) tutorial :: R2.Leaf (sessions :: Array Session, tasks :: T.Box GAT.Storage, reloadForest :: T.Box T2.Reload)
tutorial props = R.createElement tutorialCpt props [] tutorial props = R.createElement tutorialCpt props []
tutorialCpt :: R.Component (sessions :: Array Session, tasks:: T.Box GAT.Storage) tutorialCpt :: R.Component (sessions :: Array Session, tasks :: T.Box GAT.Storage, reloadForest :: T.Box T2.Reload)
tutorialCpt = here.component "tutorial" cpt where tutorialCpt = here.component "tutorial" cpt where
cpt {sessions, tasks} _ = do cpt {sessions, tasks, reloadForest} _ = do
let folders = makeFolders sessions let folders = makeFolders sessions
pure $ H.div { className: "mx-auto container" } pure $ H.div { className: "mx-auto container" }
[ H.div {className: "d-flex justify-content-center"} [ H.table {} folders ] [ H.div {className: "d-flex justify-content-center"} [ H.table {} folders ]
, H.h1 {} [H.text "Welcome!"] -- , H.h1 {} [H.text "Tutorials"]
, H.h2 {} [H.text "For easy start, just watch the tutorials"] -- , summary
, summary -- , H.h3 {} [H.text "Resources"]
, H.h3 {} [H.text "Tutorial resources"] -- , section "How to start?" "alert-info" startTutos
, section "How to start?" "alert-info" startTutos
-- , section "How to play?" "alert-warning" playTutos -- , section "How to play?" "alert-warning" playTutos
-- , section "How to master?" "alert-danger" expertTutos -- , section "How to master?" "alert-danger" expertTutos
] ]
...@@ -178,11 +179,11 @@ tutorialCpt = here.component "tutorial" cpt where ...@@ -178,11 +179,11 @@ tutorialCpt = here.component "tutorial" cpt where
sessionToFolder session@(Session {treeId, username, backend: (Backend {name})}) = sessionToFolder session@(Session {treeId, username, backend: (Backend {name})}) =
H.tr {} [ H.tr {} [
H.div { className: "d-flex justify-content-center" } [ H.text (username <> "@" <> name) ] H.div { className: "d-flex justify-content-center" } [ H.text (username <> "@" <> name) ]
, H.div {} [ FV.folderView {session, tasks, nodeId: treeId, backFolder: false} ] ] , H.div {} [ FV.folderView {session, tasks, reloadForest, nodeId: treeId, backFolder: false} ] ]
startTutos :: Array Tuto startTutos :: Array Tuto
startTutos = startTutos =
[ Tuto { title: "The tree is your friend" [ Tuto { title: "The tree to manage your data"
, id: "0_tree.ogv" , id: "0_tree.ogv"
, text : "The tree enables you to control all your actions. The Tree has typed nodes. Each node has some attributes and some methods which depend on its type. This specific ergonomy helps the memorization of all the complexity of the GarganTexts' features: hence you do not need to remember all the documentation! Just remember these simple axioms, the Tree is built with parent-children relations of nodes which have specific attributes and methods. To get its methods and attributes, just click on the wheel near its name (for this feature, see advanced tutorial: how to play with GarganText)." } , text : "The tree enables you to control all your actions. The Tree has typed nodes. Each node has some attributes and some methods which depend on its type. This specific ergonomy helps the memorization of all the complexity of the GarganTexts' features: hence you do not need to remember all the documentation! Just remember these simple axioms, the Tree is built with parent-children relations of nodes which have specific attributes and methods. To get its methods and attributes, just click on the wheel near its name (for this feature, see advanced tutorial: how to play with GarganText)." }
-- , Tuto { title : "Edit your profile" -- , Tuto { title : "Edit your profile"
......
...@@ -26,6 +26,7 @@ import Gargantext.Components.Nodes.Annuaire.User (userLayout) ...@@ -26,6 +26,7 @@ import Gargantext.Components.Nodes.Annuaire.User (userLayout)
import Gargantext.Components.Nodes.Annuaire.User.Contact (contactLayout) import Gargantext.Components.Nodes.Annuaire.User.Contact (contactLayout)
import Gargantext.Components.Nodes.Corpus (corpusLayout) import Gargantext.Components.Nodes.Corpus (corpusLayout)
import Gargantext.Components.Nodes.Corpus.Dashboard (dashboardLayout) import Gargantext.Components.Nodes.Corpus.Dashboard (dashboardLayout)
import Gargantext.Components.Nodes.Corpus.Phylo (phyloLayout)
import Gargantext.Components.Nodes.Corpus.Document (documentMainLayout) import Gargantext.Components.Nodes.Corpus.Document (documentMainLayout)
import Gargantext.Components.Nodes.File (fileLayout) import Gargantext.Components.Nodes.File (fileLayout)
import Gargantext.Components.Nodes.Frame (frameLayout) import Gargantext.Components.Nodes.Frame (frameLayout)
...@@ -180,6 +181,7 @@ renderRouteCpt = here.component "renderRoute" cpt where ...@@ -180,6 +181,7 @@ renderRouteCpt = here.component "renderRoute" cpt where
GR.Lists s n -> lists (sessionNodeProps s n) [] GR.Lists s n -> lists (sessionNodeProps s n) []
GR.Login -> login' boxes GR.Login -> login' boxes
GR.PGraphExplorer s g -> graphExplorer (sessionNodeProps s g) [] GR.PGraphExplorer s g -> graphExplorer (sessionNodeProps s g) []
GR.PhyloExplorer s g -> phyloExplorer (sessionNodeProps s g) []
GR.RouteFile s n -> routeFile (sessionNodeProps s n) [] GR.RouteFile s n -> routeFile (sessionNodeProps s n) []
GR.RouteFrameCalc s n -> routeFrame (Record.merge { nodeType: NodeFrameCalc } $ sessionNodeProps s n) [] GR.RouteFrameCalc s n -> routeFrame (Record.merge { nodeType: NodeFrameCalc } $ sessionNodeProps s n) []
GR.RouteFrameCode s n -> routeFrame (Record.merge { nodeType: NodeFrameNotebook } $ sessionNodeProps s n) [] GR.RouteFrameCode s n -> routeFrame (Record.merge { nodeType: NodeFrameNotebook } $ sessionNodeProps s n) []
...@@ -279,7 +281,7 @@ corpusCpt = here.component "corpus" cpt where ...@@ -279,7 +281,7 @@ corpusCpt = here.component "corpus" cpt where
cpt props@{ boxes, nodeId } _ = do cpt props@{ boxes, nodeId } _ = do
let sessionProps = RE.pick props :: Record SessionProps let sessionProps = RE.pick props :: Record SessionProps
pure $ authed (Record.merge { content: \session -> pure $ authed (Record.merge { content: \session ->
corpusLayout { nodeId, session, tasks: boxes.tasks } } sessionProps) [] corpusLayout { nodeId, session, tasks: boxes.tasks, reloadForest: boxes.reloadForest } } sessionProps) []
type CorpusDocumentProps = type CorpusDocumentProps =
( corpusId :: CorpusId ( corpusId :: CorpusId
...@@ -335,13 +337,24 @@ graphExplorerCpt = here.component "graphExplorer" cpt where ...@@ -335,13 +337,24 @@ graphExplorerCpt = here.component "graphExplorer" cpt where
GraphExplorer.explorerLayout { boxes GraphExplorer.explorerLayout { boxes
, graphId: nodeId , graphId: nodeId
, session } [] } sessionProps) [] , session } [] } sessionProps) []
phyloExplorer :: R2.Component SessionNodeProps
phyloExplorer = R.createElement phyloExplorerCpt
phyloExplorerCpt :: R.Component SessionNodeProps
phyloExplorerCpt = here.component "phylo" cpt
where
cpt props@{ boxes, nodeId } _ = do
let sessionProps = RE.pick props :: Record SessionProps
pure $ authed (Record.merge { content: \session ->
phyloLayout { nodeId, session } [] } sessionProps) []
home :: R2.Component Props home :: R2.Component Props
home = R.createElement homeCpt home = R.createElement homeCpt
homeCpt :: R.Component Props homeCpt :: R.Component Props
homeCpt = here.component "home" cpt where homeCpt = here.component "home" cpt where
cpt props@{ boxes: boxes@{ backend, sessions, showLogin, tasks } } _ = do cpt props@{ boxes: boxes@{ backend, sessions, showLogin, tasks, reloadForest} } _ = do
pure $ homeLayout { backend, lang: LL_EN, sessions, showLogin, tasks } pure $ homeLayout { backend, lang: LL_EN, sessions, showLogin, tasks, reloadForest }
lists :: R2.Component SessionNodeProps lists :: R2.Component SessionNodeProps
lists = R.createElement listsCpt lists = R.createElement listsCpt
...@@ -410,7 +423,7 @@ teamCpt = here.component "team" cpt where ...@@ -410,7 +423,7 @@ teamCpt = here.component "team" cpt where
cpt props@{ boxes, nodeId } _ = do cpt props@{ boxes, nodeId } _ = do
let sessionProps = RE.pick props :: Record SessionProps let sessionProps = RE.pick props :: Record SessionProps
pure $ authed (Record.merge { content: \session -> pure $ authed (Record.merge { content: \session ->
corpusLayout { nodeId, session, tasks: boxes.tasks} } sessionProps) [] corpusLayout { nodeId, session, tasks: boxes.tasks, reloadForest: boxes.reloadForest } } sessionProps) []
texts :: R2.Component SessionNodeProps texts :: R2.Component SessionNodeProps
texts = R.createElement textsCpt texts = R.createElement textsCpt
......
...@@ -113,28 +113,21 @@ dependOnContainer container notFoundMsg f = do ...@@ -113,28 +113,21 @@ dependOnContainer container notFoundMsg f = do
-- | Effect for handling pausing FA via state changes. We need this because -- | Effect for handling pausing FA via state changes. We need this because
-- | pausing can be done not only via buttons but also from the initial -- | pausing can be done not only via buttons but also from the initial
-- | setTimer. -- | setTimer.
--handleForceAtlasPause sigmaRef (toggled /\ setToggled) mFAPauseRef = do handleForceAtlas2Pause :: forall settings. R.Ref Sigma -> T.Box ST.ForceAtlasState -> R.Ref (Maybe TimeoutId) -> settings -> Effect Unit
handleForceAtlas2Pause :: R.Ref Sigma -> T.Box ST.ForceAtlasState -> R.Ref (Maybe TimeoutId) -> Effect Unit handleForceAtlas2Pause sigmaRef forceAtlasState mFAPauseRef settings = do
handleForceAtlas2Pause sigmaRef forceAtlasState mFAPauseRef = do
let sigma = R.readRef sigmaRef let sigma = R.readRef sigmaRef
toggled <- T.read forceAtlasState toggled <- T.read forceAtlasState
dependOnSigma sigma "[handleForceAtlas2Pause] sigma: Nothing" $ \s -> do dependOnSigma sigma "[handleForceAtlas2Pause] sigma: Nothing" $ \s -> do
--log2 "[handleForceAtlas2Pause] mSigma: Just " s
--log2 "[handleForceAtlas2Pause] toggled: " toggled
let isFARunning = Sigma.isForceAtlas2Running s let isFARunning = Sigma.isForceAtlas2Running s
--log2 "[handleForceAtlas2Pause] isFARunning: " isFARunning
case Tuple toggled isFARunning of case Tuple toggled isFARunning of
Tuple ST.InitialRunning false -> do Tuple ST.InitialRunning false -> do
-- hide edges during forceAtlas rendering, this prevents flickering Sigma.restartForceAtlas2 s settings
Sigma.restartForceAtlas2 s
Tuple ST.Running false -> do Tuple ST.Running false -> do
-- hide edges during forceAtlas rendering, this prevents flickering Sigma.restartForceAtlas2 s settings
Sigma.restartForceAtlas2 s
case R.readRef mFAPauseRef of case R.readRef mFAPauseRef of
Nothing -> pure unit Nothing -> pure unit
Just timeoutId -> clearTimeout timeoutId Just timeoutId -> clearTimeout timeoutId
Tuple ST.Paused true -> do Tuple ST.Paused true -> do
-- restore edges state
Sigma.stopForceAtlas2 s Sigma.stopForceAtlas2 s
_ -> pure unit _ -> pure unit
......
...@@ -222,8 +222,8 @@ startForceAtlas2 :: forall settings. Sigma -> settings -> Effect Unit ...@@ -222,8 +222,8 @@ startForceAtlas2 :: forall settings. Sigma -> settings -> Effect Unit
startForceAtlas2 s settings = pure $ s ... "startForceAtlas2" $ [ settings ] startForceAtlas2 s settings = pure $ s ... "startForceAtlas2" $ [ settings ]
-- | Restart forceAtlas2 on a sigmajs instance. -- | Restart forceAtlas2 on a sigmajs instance.
restartForceAtlas2 :: Sigma -> Effect Unit restartForceAtlas2 :: forall settings. Sigma -> settings -> Effect Unit
restartForceAtlas2 s = startForceAtlas2 s null restartForceAtlas2 s settings = startForceAtlas2 s settings
-- | Stop forceAtlas2 on a sigmajs instance. -- | Stop forceAtlas2 on a sigmajs instance.
stopForceAtlas2 :: Sigma -> Effect Unit stopForceAtlas2 :: Sigma -> Effect Unit
...@@ -239,14 +239,14 @@ isForceAtlas2Running s = s ... "isForceAtlas2Running" $ [] :: Boolean ...@@ -239,14 +239,14 @@ isForceAtlas2Running s = s ... "isForceAtlas2Running" $ [] :: Boolean
-- | Refresh forceAtlas2 (with a `setTimeout` hack as it seems it doesn't work -- | Refresh forceAtlas2 (with a `setTimeout` hack as it seems it doesn't work
-- | otherwise). -- | otherwise).
refreshForceAtlas :: Sigma -> Effect Unit refreshForceAtlas :: forall settings. Sigma -> settings -> Effect Unit
refreshForceAtlas s = do refreshForceAtlas s settings = do
let isRunning = isForceAtlas2Running s let isRunning = isForceAtlas2Running s
if isRunning then if isRunning then
pure unit pure unit
else do else do
_ <- setTimeout 100 $ do _ <- setTimeout 100 $ do
restartForceAtlas2 s restartForceAtlas2 s settings
_ <- setTimeout 100 $ _ <- setTimeout 100 $
stopForceAtlas2 s stopForceAtlas2 s
pure unit pure unit
......
...@@ -4,14 +4,3 @@ exports.goToImpl = function(cam) { ...@@ -4,14 +4,3 @@ exports.goToImpl = function(cam) {
return cam.goTo(props); return cam.goTo(props);
}; };
}; };
exports.pauseForceAtlas2 = function() {
var s = window.sigmaGargInstance;
if (s) {
if (s.isForceAtlas2Running()) {
s.stopForceAtlas2()
}
else {
s.startForceAtlas2()
}
}
};
...@@ -103,8 +103,6 @@ foreign import goToImpl :: forall o. CameraInstance -> EffectFn1 { | o } CameraI ...@@ -103,8 +103,6 @@ foreign import goToImpl :: forall o. CameraInstance -> EffectFn1 { | o } CameraI
goTo :: forall o. Optional o CameraProps => CameraInstance -> { | o } -> Effect CameraInstance goTo :: forall o. Optional o CameraProps => CameraInstance -> { | o } -> Effect CameraInstance
goTo cam = runEffectFn1 (goToImpl cam) goTo cam = runEffectFn1 (goToImpl cam)
foreign import pauseForceAtlas2 :: Effect Unit
type SigmaProps = type SigmaProps =
( renderer :: String ( renderer :: String
, settings :: SigmaSettings , settings :: SigmaSettings
......
...@@ -157,7 +157,7 @@ eqGraph (Graph {nodes: n1, edges: e1}) (Graph {nodes: n2, edges: e2}) = (n1 == n ...@@ -157,7 +157,7 @@ eqGraph (Graph {nodes: n1, edges: e1}) (Graph {nodes: n2, edges: e2}) = (n1 == n
-- however when graph is loaded initially, forceAtlas is running for a couple of -- however when graph is loaded initially, forceAtlas is running for a couple of
-- seconds and then stops (unless the user alters this by clicking the toggle -- seconds and then stops (unless the user alters this by clicking the toggle
-- button). -- button).
data ForceAtlasState = InitialRunning | InitialStopped | Running | Paused data ForceAtlasState = InitialRunning | InitialStopped | Running | Paused | Killed
derive instance genericForceAtlasState :: Generic ForceAtlasState _ derive instance genericForceAtlasState :: Generic ForceAtlasState _
instance eqForceAtlasState :: Eq ForceAtlasState where instance eqForceAtlasState :: Eq ForceAtlasState where
...@@ -168,6 +168,7 @@ toggleForceAtlasState InitialRunning = Paused ...@@ -168,6 +168,7 @@ toggleForceAtlasState InitialRunning = Paused
toggleForceAtlasState InitialStopped = InitialRunning toggleForceAtlasState InitialStopped = InitialRunning
toggleForceAtlasState Running = Paused toggleForceAtlasState Running = Paused
toggleForceAtlasState Paused = Running toggleForceAtlasState Paused = Running
toggleForceAtlasState Killed = InitialRunning
-- | Custom state for show edges. Normally it is EShow or EHide (show/hide -- | Custom state for show edges. Normally it is EShow or EHide (show/hide
-- | edges). However, edges are temporarily turned off when forceAtlas is -- | edges). However, edges are temporarily turned off when forceAtlas is
...@@ -218,6 +219,8 @@ forceAtlasEdgeState Running EShow = ETempHiddenThenShow ...@@ -218,6 +219,8 @@ forceAtlasEdgeState Running EShow = ETempHiddenThenShow
forceAtlasEdgeState Running es = es forceAtlasEdgeState Running es = es
forceAtlasEdgeState Paused ETempHiddenThenShow = EShow forceAtlasEdgeState Paused ETempHiddenThenShow = EShow
forceAtlasEdgeState Paused es = es forceAtlasEdgeState Paused es = es
forceAtlasEdgeState Killed ETempHiddenThenShow = EShow
forceAtlasEdgeState Killed es = es
louvainEdges :: SGraph -> Array (Record Louvain.Edge) louvainEdges :: SGraph -> Array (Record Louvain.Edge)
......
...@@ -24,6 +24,7 @@ router = oneOf ...@@ -24,6 +24,7 @@ router = oneOf
<*> (lit "document" *> int) <*> (lit "document" *> int)
, Dashboard <$> (route "dashboard" *> sid) <*> int , Dashboard <$> (route "dashboard" *> sid) <*> int
, PGraphExplorer <$> (route "graph" *> sid) <*> int , PGraphExplorer <$> (route "graph" *> sid) <*> int
, PhyloExplorer <$> (route "phylo" *> sid) <*> int
, Texts <$> (route "texts" *> sid) <*> int , Texts <$> (route "texts" *> sid) <*> int
, Lists <$> (route "lists" *> sid) <*> int , Lists <$> (route "lists" *> sid) <*> int
, ContactPage <$> (route "annuaire" *> sid) <*> int , ContactPage <$> (route "annuaire" *> sid) <*> int
......
...@@ -24,6 +24,7 @@ data AppRoute ...@@ -24,6 +24,7 @@ data AppRoute
| Lists SessionId Int | Lists SessionId Int
| Login | Login
| PGraphExplorer SessionId Int | PGraphExplorer SessionId Int
| PhyloExplorer SessionId Int
| RouteFile SessionId Int | RouteFile SessionId Int
| RouteFrameCalc SessionId Int | RouteFrameCalc SessionId Int
| RouteFrameCode SessionId Int | RouteFrameCode SessionId Int
...@@ -70,6 +71,7 @@ instance showAppRoute :: Show AppRoute where ...@@ -70,6 +71,7 @@ instance showAppRoute :: Show AppRoute where
show (Document _ s i) = "Document" <> show i <> " (" <> show s <> ")" show (Document _ s i) = "Document" <> show i <> " (" <> show s <> ")"
show (CorpusDocument s _ _ i) = "CorpusDocument" <> show i <> " (" <> show s <> ")" show (CorpusDocument s _ _ i) = "CorpusDocument" <> show i <> " (" <> show s <> ")"
show (PGraphExplorer s i) = "graphExplorer" <> show i <> " (" <> show s <> ")" show (PGraphExplorer s i) = "graphExplorer" <> show i <> " (" <> show s <> ")"
show (PhyloExplorer s i) = "phyloExplorer" <> show i <> " (" <> show s <> ")"
show (Dashboard s i) = "Dashboard" <> show i <> " (" <> show s <> ")" show (Dashboard s i) = "Dashboard" <> show i <> " (" <> show s <> ")"
show (Texts s i) = "texts" <> show i <> " (" <> show s <> ")" show (Texts s i) = "texts" <> show i <> " (" <> show s <> ")"
show (Lists s i) = "lists" <> show i <> " (" <> show s <> ")" show (Lists s i) = "lists" <> show i <> " (" <> show s <> ")"
...@@ -95,6 +97,7 @@ appPath (Corpus s i) = "corpus/" <> show s <> "/" <> show i ...@@ -95,6 +97,7 @@ appPath (Corpus s i) = "corpus/" <> show s <> "/" <> show i
appPath (Document s l i) = "list/" <> show s <> "/" <> show l <> "/document/" <> show i appPath (Document s l i) = "list/" <> show s <> "/" <> show l <> "/document/" <> show i
appPath (Dashboard s i) = "dashboard/" <> show s <> "/" <> show i appPath (Dashboard s i) = "dashboard/" <> show s <> "/" <> show i
appPath (PGraphExplorer s i) = "graph/" <> show s <> "/" <> show i appPath (PGraphExplorer s i) = "graph/" <> show s <> "/" <> show i
appPath (PhyloExplorer s i) = "phylo/" <> show s <> "/" <> show i
appPath (Texts s i) = "texts/" <> show s <> "/" <> show i appPath (Texts s i) = "texts/" <> show s <> "/" <> show i
appPath (Lists s i) = "lists/" <> show s <> "/" <> show i appPath (Lists s i) = "lists/" <> show s <> "/" <> show i
appPath (Annuaire s i) = "annuaire/" <> show s <> "/" <> show i appPath (Annuaire s i) = "annuaire/" <> show s <> "/" <> show i
...@@ -114,6 +117,7 @@ nodeTypeAppRoute GT.FolderPrivate s i = Just $ FolderPrivate s i ...@@ -114,6 +117,7 @@ nodeTypeAppRoute GT.FolderPrivate s i = Just $ FolderPrivate s i
nodeTypeAppRoute GT.FolderPublic s i = Just $ FolderPublic s i nodeTypeAppRoute GT.FolderPublic s i = Just $ FolderPublic s i
nodeTypeAppRoute GT.FolderShared s i = Just $ FolderShared s i nodeTypeAppRoute GT.FolderShared s i = Just $ FolderShared s i
nodeTypeAppRoute GT.Graph s i = Just $ PGraphExplorer s i nodeTypeAppRoute GT.Graph s i = Just $ PGraphExplorer s i
nodeTypeAppRoute GT.Phylo s i = Just $ PhyloExplorer s i
nodeTypeAppRoute GT.NodeContact s i = Just $ Annuaire s i nodeTypeAppRoute GT.NodeContact s i = Just $ Annuaire s i
nodeTypeAppRoute GT.NodeFile s i = Just $ RouteFile s i nodeTypeAppRoute GT.NodeFile s i = Just $ RouteFile s i
nodeTypeAppRoute GT.NodeList s i = Just $ Lists s i nodeTypeAppRoute GT.NodeList s i = Just $ Lists s i
......
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