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
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
gargantext
purescript-gargantext
Commits
994d62b0
Commit
994d62b0
authored
Jul 02, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PHYLO] Tree node url.
parent
9982eb4c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
5 deletions
+18
-5
Tree.purs
src/Gargantext/Components/Tree.purs
+3
-1
Config.purs
src/Gargantext/Config.purs
+15
-4
No files found.
src/Gargantext/Components/Tree.purs
View file @
994d62b0
...
...
@@ -528,7 +528,9 @@ toHtml d s@(NTree (LNode {id, name, nodeType}) ary) n = R.createElement el {} []
mainSpan nodeState folderOpen droppedFile isDragOver =
H.span (dropProps droppedFile isDragOver)
[ folderIcon folderOpen
, H.a { href: (toUrl Front nodeType (Just id))
, H.a { href: if nodeType == Phylo then (toUrl Static nodeType (Just id))
else (toUrl Front nodeType (Just id))
, target : if nodeType == Phylo then "blank" else ""
, style: {"margin-left": "22px"}
, onClick: mkEffectFn1 $ (\e -> d $ CurrentNode id)
}
...
...
src/Gargantext/Config.purs
View file @
994d62b0
...
...
@@ -31,7 +31,9 @@ endConfig = endConfig' V10
endConfig' :: ApiVersion -> EndConfig
endConfig' v = { front : frontRelative
, back : backLocal v }
, back : backLocal v
, static : staticRelative
}
-- , back : backDemo v }
------------------------------------------------------------------------
...
...
@@ -40,6 +42,11 @@ frontRelative = { baseUrl: ""
, prePath: "/#/"
}
staticRelative :: Config
staticRelative = { baseUrl: ""
, prePath : "/"
}
frontCaddy :: Config
frontCaddy = { baseUrl: "http://localhost:2015"
, prePath: "/#/"
...
...
@@ -85,6 +92,7 @@ backProd v = { baseUrl: "https://gargantext.org"
type EndConfig = { front :: Config
, back :: Config
, static :: Config
}
type Config = { baseUrl :: String
...
...
@@ -100,9 +108,10 @@ type Url = String
doUrl :: UrlBase -> UrlPath -> UrlParam -> Url
doUrl b p ps = b <> p <> ps
endOf :: forall cfg. End -> { front :: cfg, back :: cfg } -> cfg
endOf :: forall cfg. End -> { front :: cfg, back :: cfg
, static :: cfg
} -> cfg
endOf Back = _.back
endOf Front = _.front
endOf Static = _.static
endBaseUrl :: End -> EndConfig -> UrlBase
endBaseUrl end c = (endOf end c).baseUrl
...
...
@@ -139,6 +148,7 @@ pathUrl c (Tab t o l s) i =
pathUrl c (Children n o l s) i =
pathUrl c (NodeAPI Node) i <>
"/" <> "children?type=" <> show n <> offsetUrl o <> limitUrl l <> orderUrl s
pathUrl c (NodeAPI Phylo) pId = "phyloscape?nodeId=" <> (show $ maybe 0 identity pId)
pathUrl c (GetNgrams
{ tabType: t
, offset: o
...
...
@@ -164,7 +174,6 @@ pathUrl c (GetNgrams
base = case t of
TabCorpus _ -> pathUrl c (NodeAPI Node) i
_ -> pathUrl c (NodeAPI Url_Document) i
pathUrl c (ListDocument lId) dId =
pathUrl c (NodeAPI NodeList) lId <> "/document/" <> (show $ maybe 0 identity dId)
...
...
@@ -245,6 +254,8 @@ data NodeType = NodeUser
| Tree
| NodeList
derive instance eqNodeType :: Eq NodeType
instance showNodeType :: Show NodeType where
show NodeUser = "NodeUser"
show Annuaire = "Annuaire"
...
...
@@ -363,7 +374,7 @@ instance showChartType :: Show ChartType
show ChartPie = "pie"
show ChartTree = "tree"
data End = Back | Front
data End = Back | Front
| Static
type Id = Int
type Limit = Int
...
...
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