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
0ca60338
Commit
0ca60338
authored
Nov 05, 2020
by
Lauri Himanen
Browse files
Removed guiRoot from config, reading it from window.location instead.
parent
fea1a6b1
Pipeline
#85810
skipped with stage
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
client/bundle.js
View file @
0ca60338
This source diff could not be displayed because it is too large. You can
view the blob
instead.
client/conf.js
View file @
0ca60338
window
.
nomadEnv
=
{
//apiRoot: "https://labdev-nomad.esc.rzg.mpg.de/dev/nomad/encyclopedia-api/",
//guiRoot: "https://labdev-nomad.esc.rzg.mpg.de/dev/nomad/encyclopedia-api/",
apiRoot
:
"
https://nomad-lab.eu/prod/rae/api/encyclopedia/
"
,
guiRoot
:
"
https://nomad-lab.eu/prod/rae/encyclopedia/
"
,
//guiRoot: "http://localhost:3000/gui/",
//apiRoot: "http://localhost:8000/fairdi/nomad/latest/api/encyclopedia/",
keycloakBase
:
'
https://nomad-lab.eu/fairdi/keycloak/auth/
'
,
keycloakRealm
:
'
fairdi_nomad_test
'
,
...
...
client/src/main.js
View file @
0ca60338
...
...
@@ -42,6 +42,9 @@ let contentElement = document.getElementById('content');
let
titleElement
=
document
.
querySelector
(
'
title
'
);
window
.
allowNewLoadPopup
=
true
;
var
getUrl
=
window
.
location
;
var
guiRoot
=
getUrl
.
protocol
+
"
//
"
+
getUrl
.
host
+
"
/
"
+
getUrl
.
pathname
;
// As of 0.8.3 nomad-FAIR is using KeyCloak 7.0.0, which does
// not support the "silentCheckSsoRedirectUri" option. This option enables a
// silent login check that does not enforce reloads. In order to do such silent
...
...
@@ -72,7 +75,7 @@ let logoutButton = document.querySelector('#logout-button');
let
userName
=
document
.
querySelector
(
'
#user-name
'
);
keycloak
.
init
({
onLoad
:
"
check-sso
"
,
silentCheckSsoRedirectUri
:
`
${
window
.
nomadEnv
.
guiRoot
}
silent-check-sso.html`
,
silentCheckSsoRedirectUri
:
`
${
guiRoot
}
silent-check-sso.html`
,
promiseType
:
"
native
"
,
}).
then
((
authenticated
)
=>
{
if
(
authenticated
)
{
...
...
@@ -93,7 +96,7 @@ keycloak.init({
}
});
loginButton
.
onclick
=
()
=>
{
keycloak
.
login
({
redirectUri
:
`
${
window
.
nomadEnv
.
guiRoot
}
#/search`
})
keycloak
.
login
({
redirectUri
:
`
${
guiRoot
}
#/search`
})
.
catch
(()
=>
{
console
.
log
(
"
Authentication error.
"
);});
};
logoutButton
.
onclick
=
()
=>
{
...
...
client/src/material-mod/MethodologyDetails.view.js
View file @
0ca60338
...
...
@@ -33,8 +33,8 @@ let InfoSys = require('../common/InfoSys.js');
let
DataStore
=
require
(
'
./DataStore.js
'
);
let
SortingButton
=
require
(
'
./SortingButton.js
'
);
let
guiRoot
=
window
.
nomadEnv
.
guiRoot
;
var
getUrl
=
window
.
location
;
var
guiRoot
=
getUrl
.
protocol
+
"
//
"
+
getUrl
.
host
+
"
/
"
+
getUrl
.
pathname
;
let
REPOSITORY_LINK
=
guiRoot
.
slice
(
0
,
guiRoot
.
lastIndexOf
(
'
/
'
,
guiRoot
.
lastIndexOf
(
'
/
'
)
-
1
))
+
"
/gui/entry/id
"
const
calcTypesMap
=
new
Map
([
...
...
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