Commit e42f03ae authored by Lauri Himanen's avatar Lauri Himanen
Browse files

Merged.

parents 17541e25 e893fbff
Pipeline #77853 passed with stages
in 28 minutes and 43 seconds
Subproject commit af2bcff3956b83698e3c3fa733df7b5a54264ee1
Subproject commit 85cc99b320454f8c8a68bdf376e128c156cf2ac2
Subproject commit 2e385c1dbf934157d0e533ee709595fd0ccfb742
Subproject commit 4c83e96bcbf9080d431b7b22f1ecabd4b64dec27
......@@ -5,12 +5,12 @@ We release the NOMAD client library as a Python `distutils <https://docs.python.
You can download and install it the usual way using *pip* (or *conda*).
Install from pypi
.. parsed-literal::
.. code-block:: sh
pip install nomad-lab
Download and install latest release from nomad
.. parsed-literal::
.. code-block:: sh
curl https://repository.nomad-coe.eu/v0.8/dist/nomad-lab.tar.gz -o nomad-lab.tar.gz
pip install ./nomad-lab.tar.gz
......@@ -24,14 +24,16 @@ Other functions, e.g. using the NOMAD parsers to parse your code output, require
additional dependencies. You can use the ``[extra]`` notation to install these extra
requirements:
.. parsed-literal::
.. code-block:: sh
pip install nomad-lab[parsing]
pip install nomad-lab[infrastructure]
pip install nomad-lab[dev]
pip install nomad-lab[all]
The various *extras* have the following meaning:
- ``parsing``, everything necessary to run the parsers
- ``infrastructure``, everything to run NOMAD services
- ``dev``, additional tools that are necessary to develop NOMAD
- ``all``, all of the above
......@@ -80,7 +80,14 @@ To install libmagick for conda, you can use (other channels might also work):
conda -c conda-forge install --name nomad_env libmagic
```
The next steps can be done using the `setup.sh` script. If you prefere to understand all
#### pip
Make sure you have the most recent version of pip:
```
pip install --upgrade pip
```
The next steps can be done using the `setup.sh` script. If you prefer to understand all
the steps and run them manually, read on:
......
......@@ -4,7 +4,13 @@ window.nomadEnv = {
'keycloakClientId': 'nomad_gui_dev',
'appBase': 'http://localhost:8000/fairdi/nomad/latest',
'debug': false,
'sendTrackingData': true,
'matomoEnabled': true,
'matomoUrl': 'https://repository.nomad-coe.eu/fairdi/stat',
'matomoSiteId': '2'
'matomoSiteId': '2',
'version': {
"label": "0.8.1",
"isBeta": true,
"usesBetaData": true,
"officialUrl": "https://repository.nomad-coe.eu/app/gui"
}
}
......@@ -99,6 +99,9 @@ export default function About() {
makeClickable('encyclopedia', () => {
window.location.href = 'https://encyclopedia.nomad-coe.eu/gui/#/search'
})
makeClickable('analytics', () => {
window.location.href = 'https://www.nomad-coe.eu/index.php?page=bigdata-analyticstoolkit'
})
makeClickable('search', () => {
history.push('/search')
})
......@@ -123,8 +126,8 @@ export default function About() {
}
}
setText('repositoryStats', [
value('n_entries', 'entries'),
value('n_uploads', 'uploads')
value('n_entries', 'entries')
// value('n_uploads', 'uploads')
])
setText('archiveStats', [
value('n_calculations', 'results'),
......
// trigger rebuild
import React, { useEffect, useState, useContext, useCallback, useRef } from 'react'
import PropTypes, { instanceOf } from 'prop-types'
import PropTypes from 'prop-types'
import { compose } from 'recompose'
import classNames from 'classnames'
import { MuiThemeProvider, withStyles, makeStyles } from '@material-ui/core/styles'
import { LinearProgress, MenuList, Typography,
AppBar, Toolbar, Button, DialogContent, DialogTitle, DialogActions, Dialog, Tooltip,
Snackbar, SnackbarContent } from '@material-ui/core'
Snackbar, SnackbarContent, FormGroup, FormControlLabel, Switch, IconButton } from '@material-ui/core'
import { Route, Link, withRouter, useLocation } from 'react-router-dom'
import BackupIcon from '@material-ui/icons/Backup'
import SearchIcon from '@material-ui/icons/Search'
......@@ -17,6 +15,8 @@ import FAQIcon from '@material-ui/icons/QuestionAnswer'
import MetainfoIcon from '@material-ui/icons/Info'
import DocIcon from '@material-ui/icons/Help'
import CodeIcon from '@material-ui/icons/Code'
import TermsIcon from '@material-ui/icons/Assignment'
import UnderstoodIcon from '@material-ui/icons/Check'
import {help as searchHelp, default as SearchPage} from './search/SearchPage'
import HelpDialog from './Help'
import { ApiProvider, withApi, apiContext } from './api'
......@@ -24,11 +24,9 @@ import { ErrorSnacks, withErrors } from './errors'
import { help as entryHelp, default as EntryPage } from './entry/EntryPage'
import About from './About'
import LoginLogout from './LoginLogout'
import { guiBase, consent, nomadTheme, appBase } from '../config'
import { guiBase, consent, nomadTheme, appBase, version } from '../config'
import {help as metainfoHelp, default as MetaInfoBrowser} from './metaInfoBrowser/MetaInfoBrowser'
import packageJson from '../../package.json'
import { Cookies, withCookies } from 'react-cookie'
import Markdown from './Markdown'
import {help as uploadHelp, default as UploadPage} from './uploads/UploadPage'
import ResolvePID from './entry/ResolvePID'
import DatasetPage from './DatasetPage'
......@@ -37,6 +35,9 @@ import {help as userdataHelp, default as UserdataPage} from './UserdataPage'
import ResolveDOI from './dataset/ResolveDOI'
import FAQ from './FAQ'
import EntryQuery from './entry/EntryQuery'
import {matomo} from '../index'
import { useCookies } from 'react-cookie'
import Markdown from './Markdown'
export const ScrollContext = React.createContext({scrollParentRef: null})
......@@ -80,7 +81,7 @@ const useMainMenuItemStyles = makeStyles(theme => ({
}
}))
function MainMenuItem({tooltip, title, path, href, icon}) {
function MainMenuItem({tooltip, title, path, href, onClick, icon}) {
const {pathname} = useLocation()
const classes = useMainMenuItemStyles()
const selected = path === pathname || (path !== '/' && pathname.startsWith(path))
......@@ -91,6 +92,7 @@ function MainMenuItem({tooltip, title, path, href, icon}) {
color={selected ? 'primary' : 'default'}
size="small"
startIcon={icon}
onClick={onClick}
{...rest}
>
{title}
......@@ -102,9 +104,115 @@ MainMenuItem.propTypes = {
'title': PropTypes.string.isRequired,
'path': PropTypes.string,
'href': PropTypes.string,
'onClick': PropTypes.func,
'icon': PropTypes.element.isRequired
}
const useBetaSnackStyles = makeStyles(theme => ({
root: {},
snack: {
backgroundColor: amber[700]
}
}))
function BetaSnack() {
const classes = useBetaSnackStyles()
const [understood, setUnderstood] = useState(false)
if (!version) {
console.log.warning('no version data available')
return ''
}
if (!version.isBeta) {
return ''
}
return <Snackbar className={classes.root}
anchorOrigin={{
vertical: 'bottom',
horizontal: 'left'
}}
open={!understood}
>
<SnackbarContent
className={classes.snack}
message={<span style={{color: 'white'}}>
You are using a beta version of NOMAD ({version.label}). {
version.usesBetaData ? 'This version is not using the official data. Everything you upload here, might get lost.' : ''
} Click <a style={{color: 'white'}} href={version.officialUrl}>here for the official NOMAD version</a>.
</span>}
action={[
<IconButton key={0} color="inherit" onClick={() => setUnderstood(true)}>
<UnderstoodIcon />
</IconButton>
]}
/>
</Snackbar>
}
function Consent() {
const [cookies, setCookie] = useCookies()
const [accepted, setAccepted] = useState(cookies['terms-accepted'])
const [optOut, setOptOut] = useState(cookies['tracking-enabled'] === 'false')
useEffect(() => {
if (!optOut) {
matomo.push(['setConsentGiven'])
} else {
matomo.push(['requireConsent'])
}
})
const handleClosed = accepted => {
if (accepted) {
setCookie('terms-accepted', true)
setCookie('tracking-enabled', !optOut)
setAccepted(true)
}
}
const handleOpen = () => {
setCookie('terms-accepted', false)
setAccepted(false)
}
return (
<React.Fragment>
<MainMenuItem
title="Terms"
onClick={handleOpen}
tooltip="NOMAD's terms"
icon={<TermsIcon/>}
/>
<Dialog
disableBackdropClick disableEscapeKeyDown
open={!accepted}
>
<DialogTitle>Terms of Use</DialogTitle>
<DialogContent>
<Markdown>{consent}</Markdown>
<FormGroup>
<FormControlLabel
control={<Switch
checked={optOut}
onChange={(e) => {
setOptOut(!optOut)
}}
color="primary"
/>}
label="Do not provide information about your use of NOMAD (opt-out)."
/>
</FormGroup>
</DialogContent>
<DialogActions>
<Button onClick={() => handleClosed(true)} color="primary">
Accept
</Button>
</DialogActions>
</Dialog>
</React.Fragment>
)
}
const useMainMenuStyles = makeStyles(theme => ({
root: {
display: 'inline-flex',
......@@ -186,6 +294,7 @@ function MainMenu() {
tooltip="NOMAD's Gitlab project"
icon={<CodeIcon/>}
/>
<Consent />
</MenuList>
}
......@@ -378,62 +487,6 @@ class NavigationUnstyled extends React.Component {
const Navigation = compose(withRouter, withErrors, withApi(false), withStyles(NavigationUnstyled.styles))(NavigationUnstyled)
class LicenseAgreementUnstyled extends React.Component {
static propTypes = {
classes: PropTypes.object.isRequired,
cookies: instanceOf(Cookies).isRequired
}
static styles = theme => ({
content: {
backgroundColor: theme.palette.primary.main
},
button: {
color: 'white'
}
})
constructor(props) {
super(props)
this.handleClosed = this.handleClosed.bind(this)
}
state = {
accepted: this.props.cookies.get('terms-accepted')
}
handleClosed(accepted) {
if (accepted) {
this.props.cookies.set('terms-accepted', true)
this.setState({accepted: true})
}
}
render() {
return (
<div>
<Dialog
disableBackdropClick disableEscapeKeyDown
open={!this.state.accepted}
>
<DialogTitle>Terms of Use</DialogTitle>
<DialogContent>
<Markdown>{consent}</Markdown>
</DialogContent>
<DialogActions>
<Button onClick={() => this.handleClosed(true)} color="primary">
Accept
</Button>
</DialogActions>
</Dialog>
</div>
)
}
}
const LicenseAgreement = compose(withCookies, withStyles(LicenseAgreementUnstyled.styles))(LicenseAgreementUnstyled)
const routes = {
'about': {
exact: true,
......@@ -493,6 +546,7 @@ class App extends React.PureComponent {
render() {
return (
<MuiThemeProvider theme={nomadTheme}>
<BetaSnack />
<ErrorSnacks>
<ApiProvider>
<Navigation>
......@@ -518,7 +572,6 @@ class App extends React.PureComponent {
</Navigation>
</ApiProvider>
</ErrorSnacks>
<LicenseAgreement />
</MuiThemeProvider>
)
}
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 1025 632" version="1.1" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
<g id="Artboard1" transform="matrix(1.00641,0,0,1.03856,-2.66723,0)">
<svg width="100%" height="100%" viewBox="0 0 1130 632" version="1.1" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
<g id="Artboard1" transform="matrix(1.10933,0,0,1.03856,-2.94,0)">
<rect x="2.65" y="0" width="1018.16" height="608.36" style="fill:none;"/>
<clipPath id="_clip1">
<rect x="2.65" y="0" width="1018.16" height="608.36"/>
</clipPath>
<g clip-path="url(#_clip1)">
<g transform="matrix(1,0,0,0.964223,9.59233e-14,12.4654)">
<g transform="matrix(0.901444,0,0,0.962871,2.64456,-0.352078)">
<path d="M927.126,246.844L960.764,227.423L958.264,223.092L922.126,243.957L927.126,246.844Z"/>
</g>
<g transform="matrix(0.907222,0,0,0.964223,0.245885,12.4654)">
<g transform="matrix(0.993631,0,0,0.998598,2.65025,0)">
<path d="M30.051,395.2L9,382.85L9,-9.946" style="fill:none;stroke:black;stroke-width:0.5px;"/>
</g>
......@@ -24,71 +23,79 @@
<path d="M884.281,286.732L855.686,302.319L855.686,615.873" style="fill:none;stroke:black;stroke-width:0.5px;"/>
</g>
</g>
<g transform="matrix(2.40523,0,0,2.33077,-418.948,-98.2253)">
<g transform="matrix(2.18207,0,0,2.33077,-379.833,-98.2253)">
<path d="M247.871,178.885L278.855,196.774" style="fill:none;stroke:black;stroke-width:2.07px;"/>
</g>
<g transform="matrix(2.40523,0,0,2.33077,-418.948,-98.2253)">
<g transform="matrix(2.18207,0,0,2.33077,-379.833,-98.2253)">
<path d="M247.871,214.663L309.839,250.44L371.806,214.663L371.806,207.187L309.839,171.41L247.871,207.187L247.871,214.663Z" style="fill:rgb(123,31,162);"/>
</g>
<g transform="matrix(0.993631,0,0,0.962871,2.65025,0)">
<g transform="matrix(0.901444,0,0,0.962871,2.65025,0)">
<path d="M33.307,410.333L475.711,154.911L554.127,200.185L551.627,204.515L475.711,160.685L38.307,413.22L33.307,410.333Z"/>
</g>
<g transform="matrix(2.40523,0,0,2.33077,-103.005,-255.503)">
<g transform="matrix(2.18207,0,0,2.33077,-93.2026,-255.503)">
<path d="M327.372,177.707L358.588,195.461L373.365,186.93L369.268,171.406L342.381,169.042L327.372,177.707Z" style="fill:white;stroke:black;stroke-width:0.83px;stroke-linecap:square;stroke-linejoin:miter;"/>
</g>
<g transform="matrix(2.40523,0,0,2.33077,-401.534,-88.4828)">
<g transform="matrix(2.18207,0,0,2.33077,-364.035,-88.4828)">
<path d="M327.35,177.72L358.566,195.474L395.044,174.413L390.948,158.89L364.06,156.525L327.35,177.72Z" style="fill:white;stroke:black;stroke-width:0.83px;stroke-linecap:square;stroke-linejoin:miter;"/>
</g>
<g transform="matrix(2.40523,0,0,2.33077,-699.627,78.2935)">
<g transform="matrix(2.18207,0,0,2.33077,-634.471,78.2935)">
<path d="M325.331,178.885L356.547,196.64L395.044,174.413L390.948,158.89L364.06,156.525L325.331,178.885Z" style="fill:white;stroke:black;stroke-width:0.83px;stroke-linecap:square;stroke-linejoin:miter;"/>
</g>
<g transform="matrix(0.993631,0,0,0.962871,2.65025,0)">
<g transform="matrix(0.901444,0,0,0.962871,2.65025,0)">
<path d="M858.552,280.292L863.552,283.179L475.711,507.099L397.295,461.826L399.795,457.496L475.711,501.326L858.552,280.292Z"/>
</g>
<g transform="matrix(2.40523,0,0,2.33077,-418.948,-98.2253)">
<g transform="matrix(2.18207,0,0,2.33077,-379.833,-98.2253)">
<path d="M453.475,154.483L495.742,178.885" style="fill:none;stroke:black;stroke-width:2.07px;stroke-linecap:butt;stroke-linejoin:miter;"/>
</g>
<g transform="matrix(2.40523,0,0,2.33077,-418.948,-98.2253)">
<g transform="matrix(2.18207,0,0,2.33077,-379.833,-98.2253)">
<path d="M371.806,143.108L433.774,178.885L495.742,143.108L495.742,135.633L433.774,99.856L371.806,135.633L371.806,143.108Z" style="fill:rgb(0,121,107);"/>
</g>
<g transform="matrix(2.40523,0,0,2.33077,-171.125,-236.877)">
<path d="M371.806,143.108L433.774,178.885L495.742,143.108L433.774,107.331L371.806,143.108Z" style="fill:white;"/>
<path d="M371.806,143.108L433.774,178.885L495.742,143.108L433.774,107.331L371.806,143.108ZM374.698,143.108L433.774,177.216L492.85,143.108L433.774,109.001L374.698,143.108Z" style="fill:rgb(255,160,0);"/>
<g transform="matrix(2.18207,0,0,2.33077,-155.002,-236.877)">
<path d="M371.806,143.108L420.589,171.273L482.557,135.496L433.774,107.331L371.806,143.108Z" style="fill:white;"/>
<path d="M371.806,143.108L420.589,171.273L482.557,135.496L433.774,107.331L371.806,143.108ZM374.698,143.108L420.589,169.603L479.665,135.496L433.774,109.001L374.698,143.108Z" style="fill:rgb(255,160,0);"/>
</g>
<g transform="matrix(2.18207,0,0,2.33077,-8.44069,-146.493)">
<path d="M360.54,136.604L409.439,164.836L471.407,129.059L422.508,100.827L360.54,136.604Z" style="fill:white;"/>
<path d="M360.54,136.604L409.439,164.836L471.407,129.059L422.508,100.827L360.54,136.604ZM363.432,136.604L409.439,163.166L468.515,129.059L422.508,102.496L363.432,136.604Z" style="fill:rgb(104,159,56);"/>
</g>
<g transform="matrix(1.44927,-0.810834,1.67347,0.93627,-632.38,373.612)">
<g transform="matrix(1.31481,-0.810834,1.51821,0.93627,-573.463,373.612)">
<text x="280px" y="325.975px" style="font-family:'TitilliumWeb-Bold', 'Titillium Web';font-weight:700;font-size:14.25px;fill:rgb(235,235,235);">repository</text>
</g>
<g transform="matrix(1.44927,-0.810834,1.67347,0.93627,-736.377,315.428)">
<g transform="matrix(1.31481,-0.810834,1.51821,0.93627,-667.812,315.428)">
<text id="repositoryStats" x="280px" y="322.821px" style="font-family:'TitilliumWeb-Regular', 'Titillium Web';font-size:9.5px;fill:rgb(235,235,235);">repository stats</text>
</g>
<g transform="matrix(1.44927,-0.810834,1.67347,0.93627,-437.669,148.307)">
<g transform="matrix(1.31481,-0.810834,1.51821,0.93627,-396.817,148.307)">
<text id="archiveStats" x="280px" y="322.821px" style="font-family:'TitilliumWeb-Regular', 'Titillium Web';font-size:9.5px;fill:rgb(235,235,235);">archiv<tspan x="303.76px " y="322.821px ">e</tspan> stats</text>
</g>
<g transform="matrix(1.44927,-0.810834,1.67347,0.93627,-516.391,267.591)">
<g transform="matrix(1.31481,-0.810834,1.51821,0.93627,-468.236,267.591)">
<text x="280px" y="324.526px" style="font-family:'TitilliumWeb-Regular', 'Titillium Web';font-size:11.875px;">pr<tspan x="290.248px " y="324.526px ">o</tspan>cessing</text>
</g>
<g transform="matrix(1.44927,-0.810834,1.67347,0.93627,-815.212,434.774)">
<g transform="matrix(1.31481,-0.810834,1.51821,0.93627,-739.332,434.774)">
<text x="280px" y="324.526px" style="font-family:'TitilliumWeb-Regular', 'Titillium Web';font-size:11.875px;">upload</text>
</g>
<g transform="matrix(1.44927,-0.810834,1.67347,0.93627,-917.772,312.429)">
<g transform="matrix(1.31481,-0.810834,1.51821,0.93627,-832.377,312.429)">
<text x="280px" y="324.526px" style="font-family:'TitilliumWeb-Regular', 'Titillium Web';font-size:11.875px;">explor<tspan x="310.578px " y="324.526px ">e</tspan></text>
</g>
<g transform="matrix(1.44927,-0.810834,1.67347,0.93627,-151.8,252.988)">
<g transform="matrix(1.31481,-0.810834,1.51821,0.93627,-137.471,252.988)">
<text x="320.14px" y="325.332px" style="font-family:'TitilliumWeb-Regular', 'Titillium Web';font-size:11.875px;">API</text>
</g>
<g transform="matrix(1.44927,-0.810834,1.67347,0.93627,-333.875,206.605)">
<g transform="matrix(1.31481,-0.810834,1.51821,0.93627,-302.653,206.605)">
<text x="280px" y="325.975px" style="font-family:'TitilliumWeb-Bold', 'Titillium Web';font-weight:700;font-size:14.25px;fill:rgb(235,235,235);">archive</text>
</g>
<g transform="matrix(1.44927,-0.810834,1.67347,0.93627,-99.6624,75.5684)">
<text x="280px" y="325.975px" style="font-family:'TitilliumWeb-Bold', 'Titillium Web';font-weight:700;font-size:14.25px;fill:rgb(255,160,0);">ency<tspan x="308.514px " y="325.975px ">c</tspan>lopedia</text>
<g transform="matrix(1.31481,-0.810834,1.51821,0.93627,-129.166,51.5201)">
<text x="280px" y="344.745px" style="font-family:'TitilliumWeb-Bold', 'Titillium Web';font-weight:700;font-size:14.25px;fill:rgb(255,160,0);">ency<tspan x="308.514px " y="344.745px ">c</tspan>lopedia</text>
</g>
<g transform="matrix(1.31481,-0.810834,1.51821,0.93627,-6.53093,127.148)">
<text x="280px" y="330.495px" style="font-family:'TitilliumWeb-Bold', 'Titillium Web';font-weight:700;font-size:14.25px;fill:rgb(104,159,56);">analytics (AI)</text>
<text x="280px" y="344.745px" style="font-family:'TitilliumWeb-Bold', 'Titillium Web';font-weight:700;font-size:14.25px;fill:rgb(104,159,56);">toolkit</text>
</g>
<g transform="matrix(38.6218,0,0,37.4262,123.231,587.392)">
<g transform="matrix(35.0386,0,0,37.4262,112.044,587.392)">
<path d="M0.232,-0.65C0.249,-0.633 0.269,-0.625 0.291,-0.625C0.313,-0.625 0.333,-0.633 0.35,-0.65C0.367,-0.667 0.375,-0.687 0.375,-0.709C0.375,-0.731 0.367,-0.75 0.35,-0.767C0.333,-0.783 0.313,-0.791 0.291,-0.791C0.269,-0.791 0.25,-0.783 0.233,-0.767C0.217,-0.75 0.209,-0.731 0.209,-0.709C0.209,-0.687 0.217,-0.667 0.232,-0.65ZM0.834,-0.875C0.846,-0.875 0.855,-0.871 0.863,-0.863C0.871,-0.855 0.875,-0.846 0.875,-0.834L0.875,-0.584C0.875,-0.572 0.871,-0.562 0.863,-0.554C0.855,-0.545 0.846,-0.541 0.834,-0.541L0.166,-0.541C0.154,-0.541 0.145,-0.545 0.137,-0.554C0.129,-0.562 0.125,-0.572 0.125,-0.584L0.125,-0.834C0.125,-0.846 0.129,-0.855 0.137,-0.863C0.145,-0.871 0.154,-0.875 0.166,-0.875L0.834,-0.875ZM0.232,-0.232C0.249,-0.217 0.269,-0.209 0.291,-0.209C0.313,-0.209 0.333,-0.217 0.35,-0.233C0.367,-0.25 0.375,-0.269 0.375,-0.291C0.375,-0.313 0.367,-0.333 0.35,-0.35C0.333,-0.367 0.313,-0.375 0.291,-0.375C0.269,-0.375 0.25,-0.367 0.233,-0.35C0.217,-0.333 0.209,-0.313 0.209,-0.291C0.209,-0.269 0.217,-0.249 0.232,-0.232ZM0.834,-0.459C0.846,-0.459 0.855,-0.455 0.863,-0.446C0.871,-0.438 0.875,-0.428 0.875,-0.416L0.875,-0.166C0.875,-0.154 0.871,-0.145 0.863,-0.137C0.855,-0.129 0.846,-0.125 0.834,-0.125L0.166,-0.125C0.154,-0.125 0.145,-0.129 0.137,-0.137C0.129,-0.145 0.125,-0.154 0.125,-0.166L0.125,-0.416C0.125,-0.428 0.129,-0.438 0.137,-0.446C0.145,-0.455 0.154,-0.459 0.166,-0.459L0.834,-0.459Z" style="fill-rule:nonzero;"/>
</g>
<g transform="matrix(42.6414,0,0,41.3214,-1.56107,435.446)">
<g transform="matrix(38.6852,0,0,41.3214,-1.17035,435.446)">
<path d="M0.264,-0.471C0.3,-0.434 0.344,-0.416 0.396,-0.416C0.449,-0.416 0.493,-0.434 0.529,-0.471C0.566,-0.507 0.584,-0.551 0.584,-0.604C0.584,-0.656 0.566,-0.7 0.529,-0.736C0.493,-0.773 0.449,-0.791 0.396,-0.791C0.344,-0.791 0.3,-0.773 0.264,-0.736C0.227,-0.7 0.209,-0.656 0.209,-0.604C0.209,-0.551 0.227,-0.507 0.264,-0.471ZM0.646,-0.416L0.854,-0.209L0.791,-0.146L0.584,-0.354L0.584,-0.387L0.572,-0.398C0.523,-0.355 0.464,-0.334 0.396,-0.334C0.321,-0.334 0.257,-0.36 0.204,-0.412C0.151,-0.464 0.125,-0.528 0.125,-0.604C0.125,-0.679 0.151,-0.743 0.204,-0.796C0.257,-0.849 0.321,-0.875 0.396,-0.875C0.472,-0.875 0.536,-0.849 0.588,-0.796C0.64,-0.743 0.666,-0.679 0.666,-0.604C0.666,-0.536 0.645,-0.477 0.602,-0.428L0.613,-0.416L0.646,-0.416Z" style="fill-rule:nonzero;"/>
</g>
<g>
<g transform="matrix(0.907222,0,0,1,0.245885,0)">
<g id="search" transform="matrix(0.993631,0,0,0.962871,2.65025,0)">
<path d="M0,412.944L17.195,395.308L76.244,360.184L96.747,377.857L34.39,413.859L34.39,448.142L0,448.142L0,412.944Z" style="fill:white;fill-opacity:0;"/>
</g>
......@@ -96,33 +103,35 @@
<path d="M325.331,178.885L356.547,196.64L395.044,174.413L390.948,158.89L364.06,156.525L325.331,178.885Z" style="fill:white;fill-opacity:0;"/>
</g>
<g id="encyclopedia" transform="matrix(2.40523,0,0,2.33077,-171.125,-236.877)">
<path d="M371.806,143.108L433.774,178.885L495.742,143.108L433.774,107.331L371.806,143.108Z" style="fill:white;fill-opacity:0;"/>
<path d="M371.806,143.108L420.769,171.377L482.737,135.6L433.774,107.331L371.806,143.108Z" style="fill:white;fill-opacity:0;"/>
</g>
<g id="analytics" transform="matrix(2.40523,0,0,2.33077,-21.8533,-153.363)">
<path d="M365.21,139.3L414.822,167.943L476.79,132.166L427.178,103.523L365.21,139.3Z" style="fill:white;fill-opacity:0;"/>
</g>
<g id="api" transform="matrix(0.993631,0,0,0.962871,2.65025,0)">
<path d="M858.874,315.909L833.39,301.196L869.409,280.401L869.409,242.554L922.903,242.554L922.903,276.811L887.712,297.128L858.874,315.909Z" style="fill:white;fill-opacity:0;"/>
</g>
</g>
<g transform="matrix(38.6218,0,0,37.4262,76.1581,559.259)">
<g transform="matrix(35.0386,0,0,37.4262,69.3381,559.259)">
<path d="M0.834,-0.375L0.834,-0.791L0.166,-0.791L0.166,-0.375L0.834,-0.375ZM0.584,-0.25L0.584,-0.291L0.416,-0.291L0.416,-0.25L0.584,-0.25ZM0.916,-0.25L1,-0.25L1,-0.166L0,-0.166L0,-0.25L0.084,-0.25L0.084,-0.875L0.916,-0.875L0.916,-0.25Z" style="fill-rule:nonzero;"/>
</g>
<g transform="matrix(38.6218,0,0,37.4262,873.787,270.237)">
<g transform="matrix(35.0386,0,0,37.4262,792.965,270.237)">
<path d="M0.834,-0.375L0.834,-0.791L0.166,-0.791L0.166,-0.375L0.834,-0.375ZM0.584,-0.25L0.584,-0.291L0.416,-0.291L0.416,-0.25L0.584,-0.25ZM0.916,-0.25L1,-0.25L1,-0.166L0,-0.166L0,-0.25L0.084,-0.25L0.084,-0.875L0.916,-0.875L0.916,-0.25Z" style="fill-rule:nonzero;"/>
</g>
<g transform="matrix(38.6218,0,0,37.4262,32.5116,527.874)">
<g transform="matrix(35.0386,0,0,37.4262,29.7411,527.874)">
<path d="M0.279,-0.369C0.356,-0.4 0.43,-0.416 0.5,-0.416C0.57,-0.416 0.644,-0.401 0.72,-0.37C0.796,-0.34 0.834,-0.299 0.834,-0.25L0.834,-0.166L0.166,-0.166L0.166,-0.25C0.166,-0.299 0.204,-0.339 0.279,-0.369ZM0.617,-0.549C0.585,-0.516 0.546,-0.5 0.5,-0.5C0.454,-0.5 0.415,-0.516 0.383,-0.549C0.35,-0.581 0.334,-0.62 0.334,-0.666C0.334,-0.712 0.35,-0.751 0.383,-0.784C0.415,-0.817 0.454,-0.834 0.5,-0.834C0.546,-0.834 0.585,-0.817 0.617,-0.784C0.65,-0.751 0.666,-0.712 0.666,-0.666C0.666,-0.62 0.65,-0.581 0.617,-0.549Z" style="fill-rule:nonzero;"/>
</g>
<g transform="matrix(1.67347,0,0,1.62167,-151.756,-438.116)">
<g transform="matrix(1.51821,0,0,1.62167,-137.43,-438.116)">
<path d="M552.85,404.535L552.85,415.278L463.786,466.7L463.786,455.956L552.85,404.535Z" style="fill:rgb(0,76,64);"/>
</g>
<g transform="matrix(1.67347,0,0,1.62167,-449.479,-271.133)">
<g transform="matrix(1.51821,0,0,1.62167,-407.531,-271.133)">
<path d="M552.629,404.407L552.629,415.151L463.786,466.7L463.786,455.956L552.629,404.407Z" style="fill:rgb(74,0,114);"/>
</g>
<g transform="matrix(1.67347,0,0,1.62167,-151.756,-438.116)">
<g transform="matrix(1.51821,0,0,1.62167,-137.43,-438.116)">
<path d="M463.786,466.7L374.722,415.278L374.722,404.535L463.786,455.956L463.786,466.7Z" style="fill:rgb(72,169,153);"/>
</g>
<g transform="matrix(1.67347,0,0,1.62167,-449.479,-271.133)">
<g transform="matrix(1.51821,0,0,1.62167,-407.531,-271.133)">
<path d="M463.786,466.7L374.501,415.151L374.501,404.407L463.786,455.956L463.786,466.7Z" style="fill:rgb(174,82,212);"/>
</g>
</g>
</g>
</svg>
......@@ -114,7 +114,7 @@ export const domains = ({
supportsSort: true
},
'dft.xc_functional': {
label: 'XT treatment',
label: 'XC functionals',
supportsSort: true
},
'dft.system': {
......
import { createMuiTheme } from '@material-ui/core'
window.nomadEnv = window.nomadEnv || {}
export const version = window.nomadEnv.version
export const appBase = window.nomadEnv.appBase.replace(/\/$/, '')
// export const apiBase = 'http://repository.nomad-coe.eu/v0.8/api'
export const apiBase = `${appBase}/api`
......@@ -12,7 +13,7 @@ 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
export const matomoEnabled = window.nomadEnv.matomoEnabled
export const email = 'webmaster@nomad-coe.eu'
export const maxLogsToShow = 50
......@@ -27,8 +28,10 @@ you and users you share your data with. The *embargo period* lasts up to 36 mont
After the *embargo* your published data will be public. **Note that public data
is visible to others and files become downloadable by everyone.**
This web-site uses *cookies*. By using this web-site you agree to our use
of *cookies*. [Learn more](https://www.cookiesandyou.com/).
This web-site uses *cookies*. We use cookies to track you login status for all NOMAD services
and optionally to store information about your use of NOMAD. None of this information is
shared with other parties. By using this web-site you agree to the described use of *cookies*.
[Learn more](https://www.cookiesandyou.com/).
`
export const nomadPrimaryColor = {
main: '#008DC3',
......
......@@ -8,16 +8,16 @@ import { Router, Route } from 'react-router-dom'
import { QueryParamProvider } from 'use-query-params'
import history from './history'
import PiwikReactRouter from 'piwik-react-router'
import { sendTrackingData, matomoUrl, matomoSiteId, keycloakBase, keycloakRealm, keycloakClientId } from './config'
import { matomoEnabled, matomoUrl, matomoSiteId, keycloakBase, keycloakRealm, keycloakClientId } from './config'
import Keycloak from 'keycloak-js'
import { KeycloakProvider } from 'react-keycloak'
import * as serviceWorker from './serviceWorker'
const matomo = sendTrackingData ? PiwikReactRouter({
export const matomo = matomoEnabled ? PiwikReactRouter({
url: matomoUrl,
siteId: matomoSiteId,
clientTrackerName: 'stat.js',
serverTrackerName: 'stat.php'
serverTrackerName: 'stat'
}) : null
const keycloak = Keycloak({
......@@ -26,9 +26,11 @@ const keycloak = Keycloak({
clientId: keycloakClientId
})
// matomo.push('requireConsent')
ReactDOM.render(
<KeycloakProvider keycloak={keycloak} initConfig={{onLoad: 'check-sso'}} LoadingComponent={<div />}>
<Router history={sendTrackingData ? matomo.connectToHistory(history) : history}>
<Router history={matomoEnabled ? matomo.connectToHistory(history) : history}>