Commit 0bd9c748 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Merge branch 'v0.6.0' of gitlab.mpcdf.mpg.de:nomad-lab/nomad-FAIR into v0.6.0

parents f73b04d9 349bbe6a
Pipeline #54567 passed with stages
in 11 minutes and 27 seconds
window.nomadEnv = {
'apiBase': 'http://localhost:8000/fairdi/nomad/latest/api',
'keycloakBase': 'http://localhost:8002/auth/realms/fairdi_nomad_test',
'keycloakBase': 'http://localhost:8002/auth',
'keycloakRealm': 'fairdi_nomad_prod',
'keycloakClientId': 'nomad_gui_dev',
'kibanaBase': '/fairdi/kibana',
'debug': false
}
......@@ -5,7 +5,7 @@ import Typography from '@material-ui/core/Typography'
import { compose } from 'recompose'
import { Button, Link } from '@material-ui/core'
import { withApi } from './api'
import { keycloakBase } from '../config'
import { keycloakBase, keycloakRealm } from '../config'
class LoginLogout extends React.Component {
static propTypes = {
......@@ -40,7 +40,7 @@ class LoginLogout extends React.Component {
<Typography color="inherit" variant="body1">
Welcome <Link
className={classes.link}
href={`${keycloakBase}/account/`}>
href={`${keycloakBase.replace(/\/$/, '')}/realms/${keycloakRealm}/account/`}>
{ user ? user.name : '...' }
</Link>
</Typography>
......
......@@ -12,6 +12,8 @@ export const kibanaBase = window.nomadEnv.kibanaBase
export const matomoUrl = window.nomadEnv.matomoUrl
export const matomoSiteId = window.nomadEnv.matomoSiteId
export const keycloakBase = window.nomadEnv.keycloakBase
export const keycloakRealm = window.nomadEnv.keycloakRealm
export const keycloakClientId = window.nomadEnv.keycloakClientId
export const debug = window.nomadEnv.debug || false
export const sendTrackingData = window.nomadEnv.sendTrackingData
......
......@@ -8,7 +8,7 @@ import registerServiceWorker from './registerServiceWorker'
import { Router } from 'react-router-dom'
import history from './history'
import PiwikReactRouter from 'piwik-react-router'
import { sendTrackingData, matomoUrl, matomoSiteId } from './config'
import { sendTrackingData, matomoUrl, matomoSiteId, keycloakBase, keycloakRealm, keycloakClientId } from './config'
import Keycloak from 'keycloak-js'
import { KeycloakProvider } from 'react-keycloak'
......@@ -18,9 +18,9 @@ const matomo = sendTrackingData ? PiwikReactRouter({
}) : null
const keycloak = Keycloak({
url: 'http://localhost:8002/auth',
realm: 'fairdi_nomad_test',
clientId: 'nomad_gui_dev'
url: keycloakBase,
realm: keycloakRealm,
clientId: keycloakClientId
})
ReactDOM.render(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment