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
fe34b637
Commit
fe34b637
authored
Nov 22, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[LOGIN] Fix for demos.
parent
e755e9e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
Login.purs
src/Gargantext/Components/Login.purs
+7
-6
Config.purs
src/Gargantext/Config.purs
+3
-3
No files found.
src/Gargantext/Components/Login.purs
View file @
fe34b637
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
-- Select a backend and log into it
-- Select a backend and log into it
module Gargantext.Components.Login where
module Gargantext.Components.Login where
import Prelude (Unit, bind, const, discard, pure,
flip,
show, ($), (<>), (*>), (<$>), (>), map)
import Prelude (Unit, bind, const, discard, pure, show, ($), (<>), (*>), (<$>), (>), map)
import Data.Array (head)
import Data.Array (head)
import Data.Either (Either(..))
import Data.Either (Either(..))
import Data.Maybe (Maybe(..), fromMaybe)
import Data.Maybe (Maybe(..), fromMaybe)
...
@@ -102,10 +102,11 @@ chooserCpt = R.staticComponent "G.C.Login.chooser" cpt where
...
@@ -102,10 +102,11 @@ chooserCpt = R.staticComponent "G.C.Login.chooser" cpt where
, H.ul {} [ renderSessions sessions]
, H.ul {} [ renderSessions sessions]
] else [] where
] else [] where
Sessions {sessions:ss} = fst sessions
Sessions {sessions:ss} = fst sessions
new = [ H.h3 {} [H.text "New connection(s)"]
new = [ H.input {className: "form-control", type:"text", placeholder: "Search for your institute"}
, H.h3 {} [H.text "Last connection(s)"]
, H.table {className : "table"}
, H.table {className : "table"}
[ H.thead {className: "thead-dark"} [ H.tr {} [ H.th {} [H.text "Label of instance"]
[ H.thead {className: "thead-dark"} [ H.tr {} [ H.th {} [H.text "Label of instance"]
, H.th {} [H.text "
Url garg protocole
"]
, H.th {} [H.text "
Gargurl
"]
, H.th {} [ H.text ""]
, H.th {} [ H.text ""]
]
]
]
]
...
@@ -117,14 +118,14 @@ renderSessions :: R2.Reductor Sessions Sessions.Action -> R.Element
...
@@ -117,14 +118,14 @@ renderSessions :: R2.Reductor Sessions Sessions.Action -> R.Element
renderSessions sessions = R.fragment (renderSession sessions <$> unSessions (fst sessions))
renderSessions sessions = R.fragment (renderSession sessions <$> unSessions (fst sessions))
where
where
renderSession :: R2.Reductor Sessions Sessions.Action -> Session -> R.Element
renderSession :: R2.Reductor Sessions Sessions.Action -> Session -> R.Element
renderSession sessions session = H.li {} $ [ H.text $ "Active session: " <> show session ]
renderSession sessions
'
session = H.li {} $ [ H.text $ "Active session: " <> show session ]
<> [ H.a { on : {click}
<> [ H.a { on : {click}
, className: "glyphitem glyphicon glyphicon-log-out"
, className: "glyphitem glyphicon glyphicon-log-out"
, id : "log-out"
, id : "log-out"
, title: "Log out"
, title: "Log out"
} [] ]
} [] ]
where
where
click _ = (snd sessions) (Sessions.Logout session)
click _ = (snd sessions
'
) (Sessions.Logout session)
renderBackend :: R.State (Maybe Backend) -> Backend -> R.Element
renderBackend :: R.State (Maybe Backend) -> Backend -> R.Element
...
@@ -139,7 +140,7 @@ renderBackend state backend@(Backend {name}) =
...
@@ -139,7 +140,7 @@ renderBackend state backend@(Backend {name}) =
where
where
click _ = (snd state) (const $ Just backend)
click _ = (snd state) (const $ Just backend)
label = DST.toUpper $ fromMaybe "" $ head $ DST.split (DST.Pattern ".") name
label = DST.toUpper $ fromMaybe "" $ head $ DST.split (DST.Pattern ".") name
url = "
(garg://" <> name <> ")"
url = "
garg://" <> name
type FormProps =
type FormProps =
( backend :: Backend
( backend :: Backend
...
...
src/Gargantext/Config.purs
View file @
fe34b637
...
@@ -5,12 +5,12 @@ import Gargantext.Ends
...
@@ -5,12 +5,12 @@ import Gargantext.Ends
import Gargantext.Types (ApiVersion(..))
import Gargantext.Types (ApiVersion(..))
defaultBackends :: NonEmpty Array Backend
defaultBackends :: NonEmpty Array Backend
defaultBackends =
prod :| [partner, demo, dev, local
]
defaultBackends =
local :| [prod, partner, demo, dev
]
where
where
prod = backend V10 "/api/" "https://v4.gargantext.org" "iscpif.cnrs"
prod = backend V10 "/api/" "https://v4.gargantext.org" "iscpif.cnrs"
partner = backend V10 "/api/" "https://demo.gargantext.org" "institut-mines-telecom.imt"
partner = backend V10 "/api/" "https://demo.gargantext.org" "institut-mines-telecom.imt"
demo = backend V10 "/api/" "https://demo.gargantext.org" "demo.cnrs"
demo = backend V10 "/api/" "https://demo.gargantext.org" "demo.
inshs.
cnrs"
dev = backend V10 "/api/" "https://dev.gargantext.org" "devel.cnrs"
dev = backend V10 "/api/" "https://dev.gargantext.org" "devel.
inshs.
cnrs"
local = backend V10 "/api/" "http://localhost:8008" "local.cnrs"
local = backend V10 "/api/" "http://localhost:8008" "local.cnrs"
defaultApps :: NonEmpty Array Frontend
defaultApps :: NonEmpty Array Frontend
...
...
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