Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Grégoire Locqueville
purescript-gargantext
Commits
02c869e6
Commit
02c869e6
authored
Sep 30, 2019
by
James Laver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nail double /
parent
50dfb748
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
9 deletions
+10
-9
Tree.purs
src/Gargantext/Components/Tree.purs
+3
-3
Ends.purs
src/Gargantext/Ends.purs
+6
-5
Types.purs
src/Gargantext/Types.purs
+1
-1
No files found.
src/Gargantext/Components/Tree.purs
View file @
02c869e6
...
@@ -27,7 +27,7 @@ import Web.File.FileList (FileList, item)
...
@@ -27,7 +27,7 @@ import Web.File.FileList (FileList, item)
import Web.File.FileReader.Aff (readAsText)
import Web.File.FileReader.Aff (readAsText)
import Gargantext.Config.REST (get, put, post, postWwwUrlencoded, delete)
import Gargantext.Config.REST (get, put, post, postWwwUrlencoded, delete)
import Gargantext.Ends (Frontends
(..)
, url)
import Gargantext.Ends (Frontends, url)
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Routes as Routes
import Gargantext.Routes as Routes
import Gargantext.Routes (AppRoute, SessionRoute(..))
import Gargantext.Routes (AppRoute, SessionRoute(..))
...
@@ -211,7 +211,7 @@ nodeMainSpan :: (Action -> Aff Unit)
...
@@ -211,7 +211,7 @@ nodeMainSpan :: (Action -> Aff Unit)
-> Session
-> Session
-> Frontends
-> Frontends
-> R.Element
-> R.Element
nodeMainSpan d p folderOpen session
(Frontends frontends)
= R.createElement el p []
nodeMainSpan d p folderOpen session
frontends
= R.createElement el p []
where
where
el = R.hooksComponent "NodeMainSpan" cpt
el = R.hooksComponent "NodeMainSpan" cpt
cpt {id, name, nodeType, mCurrentRoute} _ = do
cpt {id, name, nodeType, mCurrentRoute} _ = do
...
@@ -222,7 +222,7 @@ nodeMainSpan d p folderOpen session (Frontends frontends) = R.createElement el p
...
@@ -222,7 +222,7 @@ nodeMainSpan d p folderOpen session (Frontends frontends) = R.createElement el p
pure $ H.span (dropProps droppedFile isDragOver)
pure $ H.span (dropProps droppedFile isDragOver)
[ folderIcon folderOpen
[ folderIcon folderOpen
, H.a { href: (url frontends
.app
(NodePath nodeType (Just id)))
, H.a { href: (url frontends (NodePath nodeType (Just id)))
, style: {marginLeft: "22px"}
, style: {marginLeft: "22px"}
}
}
[ nodeText {isSelected: (mCorpusId mCurrentRoute) == (Just id), name} ]
[ nodeText {isSelected: (mCorpusId mCurrentRoute) == (Just id), name} ]
...
...
src/Gargantext/Ends.purs
View file @
02c869e6
...
@@ -80,6 +80,12 @@ instance toUrlFrontendAppRoute :: ToUrl Frontend R.AppRoute where
...
@@ -80,6 +80,12 @@ instance toUrlFrontendAppRoute :: ToUrl Frontend R.AppRoute where
-- | The currently selected App and Static configurations
-- | The currently selected App and Static configurations
newtype Frontends = Frontends { app :: Frontend, static :: Frontend }
newtype Frontends = Frontends { app :: Frontend, static :: Frontend }
instance toUrlFrontendsRoutes :: ToUrl Frontends R.AppRoute where
toUrl f r = appUrl f (R.appPath r)
instance toUrlFrontendsNodePath :: ToUrl Frontends NodePath where
toUrl (Frontends {app}) np = frontendUrl app (nodePath np)
-- | Creates an app url from a Frontends and the path as a string
-- | Creates an app url from a Frontends and the path as a string
appUrl :: Frontends -> String -> String
appUrl :: Frontends -> String -> String
appUrl (Frontends {app}) = frontendUrl app
appUrl (Frontends {app}) = frontendUrl app
...
@@ -88,9 +94,6 @@ appUrl (Frontends {app}) = frontendUrl app
...
@@ -88,9 +94,6 @@ appUrl (Frontends {app}) = frontendUrl app
staticUrl :: Frontends -> String -> String
staticUrl :: Frontends -> String -> String
staticUrl (Frontends {static}) = frontendUrl static
staticUrl (Frontends {static}) = frontendUrl static
instance toUrlFrontendsRoutes :: ToUrl Frontends R.AppRoute where
toUrl f r = appUrl f (R.appPath r)
sessionPath :: R.SessionRoute -> String
sessionPath :: R.SessionRoute -> String
sessionPath (R.Tab t i) = sessionPath (R.NodeAPI Node i) <> "/" <> showTabType' t
sessionPath (R.Tab t i) = sessionPath (R.NodeAPI Node i) <> "/" <> showTabType' t
sessionPath (R.Children n o l s i) = root <> "children?type=" <> show n <> offsetUrl o <> limitUrl l <> orderUrl s
sessionPath (R.Children n o l s i) = root <> "children?type=" <> show n <> offsetUrl o <> limitUrl l <> orderUrl s
...
@@ -141,8 +144,6 @@ sessionPath (R.Chart {chartType, tabType} i) =
...
@@ -141,8 +144,6 @@ sessionPath (R.Chart {chartType, tabType} i) =
<> "&listType=GraphTerm" -- <> show listId
<> "&listType=GraphTerm" -- <> show listId
-- <> maybe "" (\x -> "&limit=" <> show x) limit
-- <> maybe "" (\x -> "&limit=" <> show x) limit
------- misc routing stuff
------- misc routing stuff
limitUrl :: Limit -> String
limitUrl :: Limit -> String
...
...
src/Gargantext/Types.purs
View file @
02c869e6
...
@@ -245,7 +245,7 @@ data NodePath = NodePath NodeType (Maybe Id)
...
@@ -245,7 +245,7 @@ data NodePath = NodePath NodeType (Maybe Id)
nodePath :: NodePath -> String
nodePath :: NodePath -> String
nodePath (NodePath t i) = nodeTypePath t <> "/" <> id
nodePath (NodePath t i) = nodeTypePath t <> "/" <> id
where id = maybe ""
(\j -> "/" <> show j)
i
where id = maybe ""
show
i
data ChartType = Histo | Scatter | ChartPie | ChartTree
data ChartType = Histo | Scatter | ChartPie | ChartTree
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment