Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
encyclopedia-gui
Commits
a8382fd0
Commit
a8382fd0
authored
Jul 22, 2020
by
Lauri Himanen
Browse files
Simplified config.
parent
44ccbaab
Pipeline
#79121
skipped with stage
Changes
4
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
client/bundle.js
View file @
a8382fd0
This diff is collapsed.
Click to expand it.
client/conf.js
View file @
a8382fd0
window
.
nomadEnv
=
{
//
hos
t: "https://labdev-nomad.esc.rzg.mpg.de/dev/nomad/encyclopedia-api/",
//
path: "api
/encyclopedia/",
//
apiRoo
t: "https://labdev-nomad.esc.rzg.mpg.de/dev/nomad/encyclopedia-api/",
//
guiRoot: "https://labdev-nomad.esc.rzg.mpg.de/dev/nomad
/encyclopedia
-api
/",
//userCookieDomain: ".esc.rzg.mpg.de",
host
:
"
https://nomad-lab.eu/prod/rae/
"
,
path
:
"
api/encyclopedia/
"
,
userCookieDomain
:
"
.nomad-lab.eu
"
,
//host: "/",
//path: "",
apiRoot
:
"
https://nomad-lab.eu/prod/rae/api/encyclopedia/
"
,
//guiRoot: "https://nomad-lab.eu/prod/rae/encyclopedia/",
guiRoot
:
"
http://localhost:3000/gui/
"
,
//apiRoot: "/",
//userCookieDomain: ".localhost",
guestUserToken
:
'
eyJhbGciOiJIUzI1NiIsImlhdCI6MTUyMzg4MDE1OSwiZXhwIjoxNjgxNTYwMTU5fQ.ey
'
+
'
JpZCI6ImVuY2d1aSJ9.MsMWQa3IklH7cQTxRaIRSF9q8D_2LD5Fs2-irpWPTp4
'
,
...
...
client/loadkeycloak.js
View file @
a8382fd0
...
...
@@ -18,7 +18,7 @@ let logoutButton = document.querySelector('#logout-button');
let
userName
=
document
.
querySelector
(
'
#user-name
'
);
keycloak
.
init
({
onLoad
:
"
check-sso
"
,
silentCheckSsoRedirectUri
:
"
http://localhost:3000/gui/
silent-check-sso.html
"
,
silentCheckSsoRedirectUri
:
`
${
window
.
nomadEnv
.
guiRoot
}
silent-check-sso.html
`
,
promiseType
:
"
native
"
,
}).
then
((
authenticated
)
=>
{
if
(
authenticated
)
{
...
...
@@ -37,7 +37,7 @@ keycloak.init({
}
});
loginButton
.
onclick
=
()
=>
{
keycloak
.
login
({
redirectUri
:
"
http://
"
+
window
.
location
.
host
+
"
/gui/
#/search
"
})
keycloak
.
login
({
redirectUri
:
`
${
window
.
nomadEnv
.
guiRoot
}
#/search
`
})
.
catch
(()
=>
{
console
.
log
(
"
Authentication error.
"
)})
};
logoutButton
.
onclick
=
()
=>
{
...
...
client/src/common/util.js
View file @
a8382fd0
...
...
@@ -64,7 +64,7 @@ let ELEMENTS = [
];
// API URL and user cookie domain configuration
const
API_BASE_URL
=
window
.
nomadEnv
.
host
+
window
.
nomadEnv
.
path
;
const
API_BASE_URL
=
window
.
nomadEnv
.
apiRoot
;
// Mockup URLs
//const FERMI_SURFACE_URL= HOST+'files/fermi/'+
...
...
Write
Preview
Supports
Markdown
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