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
nomad-FAIR
Commits
987d6554
Commit
987d6554
authored
Jul 27, 2020
by
Markus Scheidgen
Browse files
Fixed repo link to encyclopedia.
parent
81de5d44
Pipeline
#79461
passed with stages
in 26 minutes and 25 seconds
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
gui/public/env.js
View file @
987d6554
...
...
@@ -12,5 +12,6 @@ window.nomadEnv = {
"
isBeta
"
:
false
,
"
usesBetaData
"
:
false
,
"
officialUrl
"
:
"
https://nomad-lab.eu/prod/rae/gui
"
}
},
'
encyclopediaEnabled
'
:
true
}
gui/src/components/dft/DFTEntryOverview.js
View file @
987d6554
import
React
from
'
react
'
import
PropTypes
from
'
prop-types
'
import
{
Typography
,
Button
,
makeStyles
,
Tooltip
}
from
'
@material-ui/core
'
import
{
Typography
,
Tooltip
,
Link
}
from
'
@material-ui/core
'
import
Quantity
from
'
../Quantity
'
import
_
from
'
lodash
'
import
{
appBase
}
from
'
../../config
'
const
useStyles
=
makeStyles
(
theme
=>
({
actions
:
{
marginTop
:
theme
.
spacing
(
1
),
textAlign
:
'
right
'
,
margin
:
-
theme
.
spacing
(
1
)
}
}))
import
{
appBase
,
encyclopediaEnabled
}
from
'
../../config
'
export
default
function
DFTEntryOverview
(
props
)
{
const
classes
=
useStyles
()
const
{
data
}
=
props
if
(
!
data
.
dft
)
{
return
<
Typography
color
=
"
error
"
>
No
metadata
available
<
/Typography
>
}
const
material_name
=
entry
=>
entry
.
encyclopedia
.
material
.
material_name
const
material_name
=
entry
=>
{
let
name
try
{
name
=
entry
.
encyclopedia
.
material
.
material_name
}
catch
{}
name
=
name
||
'
unnamed
'
if
(
encyclopediaEnabled
&&
data
.
encyclopedia
&&
data
.
encyclopedia
.
material
&&
data
.
published
&&
!
data
.
with_embargo
)
{
const
url
=
`
${
appBase
}
/encyclopedia/#/material/
${
data
.
encyclopedia
.
material
.
material_id
}
`
return
(
<
Tooltip
title
=
"
Show the material of this entry in the NOMAD Encyclopedia.
"
>
<
Link
href
=
{
url
}
>
{
name
}
<
/Link
>
<
/Tooltip
>
)
}
else
{
return
name
}
}
return
<
div
>
<
Quantity
column
>
<
Quantity
row
>
<
Quantity
quantity
=
"
formula
"
label
=
'
formula
'
noWrap
{...
props
}
/
>
<
Quantity
quantity
=
{
material_name
}
label
=
'
material
name
'
noWrap
{...
props
}
/
>
<
Quantity
quantity
=
{
material_name
}
label
=
'
material
'
noWrap
{...
props
}
/
>
<
/Quantity
>
<
Quantity
row
>
<
Quantity
quantity
=
"
dft.code_name
"
label
=
'
dft code
'
noWrap
{...
props
}
/
>
...
...
@@ -46,15 +54,6 @@ export default function DFTEntryOverview(props) {
<
/Quantity
>
<
/Quantity
>
<
/Quantity
>
{
data
.
encyclopedia
&&
data
.
encyclopedia
.
material
&&
<
div
className
=
{
classes
.
actions
}
>
<
Tooltip
title
=
"
Show the material of this entry in the NOMAD Encyclopedia.
"
>
<
Button
color
=
"
primary
"
href
=
{
`
${
appBase
}
/encyclopedia/#/material/
${
data
.
encyclopedia
.
material
.
material_id
}
`
}
>
material
<
/Button
>
<
/Tooltip
>
<
/div
>
}
<
/div
>
}
...
...
gui/src/config.js
View file @
987d6554
...
...
@@ -14,6 +14,7 @@ export const keycloakRealm = window.nomadEnv.keycloakRealm
export
const
keycloakClientId
=
window
.
nomadEnv
.
keycloakClientId
export
const
debug
=
window
.
nomadEnv
.
debug
||
false
export
const
matomoEnabled
=
window
.
nomadEnv
.
matomoEnabled
export
const
encyclopediaEnabled
=
window
.
nomadEnv
.
encyclopediaEnabled
export
const
email
=
'
webmaster@nomad-coe.eu
'
export
const
maxLogsToShow
=
50
...
...
ops/helm/nomad/templates/api-deployment.yaml
View file @
987d6554
...
...
@@ -99,7 +99,8 @@ data:
"isBeta": {{ .Values.version.isBeta }},
"usesBetaData": {{ .Values.version.usesBetaData }},
"officialUrl": "{{ .Values.version.officialUrl }}"
}
},
"encyclopediaEnabled": {{ .Values.gui.encyclopediaEnabled }}
};
---
apiVersion
:
v1
...
...
ops/helm/nomad/values.yaml
View file @
987d6554
...
...
@@ -86,6 +86,8 @@ gui:
matomoEnabled
:
false
## automatically gz based on header
gzip
:
true
## enable links to the 'new' encyclopedia
encyclopediaEnabled
:
false
## Everything concerning the nginx that serves the gui, proxies the api
# It is run via NodePort service
...
...
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