diff --git a/docs/api_tutorial.md b/docs/api_tutorial.md index d4bd1abd200225062df29d54a044edcbab7d687f..128d5025d1c1e454421e059df75ba89ecf523d32 100644 --- a/docs/api_tutorial.md +++ b/docs/api_tutorial.md @@ -94,6 +94,14 @@ consist of Si, O, bulk material simulations of cubic systems (currently ~100 ent curl "http://nomad-lab.eu/prod/rae/api/raw/query?only_atoms=Si&only_atoms=O&system=bulk&crystal_system=cubic" -o download.zip ``` +Here are a few more examples for downloading the raw data of based on DOI or dataset. +You will have to encode non URL safe characters in potential dataset names (e.g. with a service like [www.urlencoder.org](https://www.urlencoder.org/)): + +``` +curl "http://nomad-lab.eu/prod/rae/api/raw/query?doi=10.17172/NOMAD/2020.03.18-1" -o download.zip +curl "http://nomad-lab.eu/prod/rae/api/raw/query?dataset=Full%20ahnarmonic%20stAViC%20approach%3A%20Silicon%20and%20SrTiO3" -o download.zip +``` + In a similar way you can see the archive of an entry: ``` diff --git a/gui/.eslintrc.js b/gui/.eslintrc.js index adf0b9e446fd36ccb8dc98e7c890814473ea1a8b..d7efbd92181f34eff18905d1fcd017a881c13718 100644 --- a/gui/.eslintrc.js +++ b/gui/.eslintrc.js @@ -14,9 +14,14 @@ module.exports = { "fetch": false, "browser": true }, + "plugins": [ + "react", "react-hooks" + ], "rules": { "space-before-function-paren": ["error", "never"], - "camelcase": [0] + "camelcase": [0], + "react-hooks/rules-of-hooks": "error", + "react-hooks/exhaustive-deps": "warn" }, "settings": { "react": { diff --git a/gui/package.json b/gui/package.json index 161487d3a2ebaf59b76f9b9f53e0223c5f703667..b31a8ba49faf7d426dbdbe8466a5b4f61f3a7bb8 100644 --- a/gui/package.json +++ b/gui/package.json @@ -4,16 +4,13 @@ "commit": "e98694e", "private": true, "dependencies": { - "@testing-library/jest-dom": "^4.2.4", - "@testing-library/react": "^9.3.2", - "@testing-library/user-event": "^7.1.2", - "react": "^16.13.1", - "react-dom": "^16.13.1", - "react-scripts": "3.4.1", "@material-ui/core": "^4.0.0", "@material-ui/icons": "^4.0.0", "@material-ui/lab": "^4.0.0-alpha.49", "@navjobs/upload": "^3.1.3", + "@testing-library/jest-dom": "^4.2.4", + "@testing-library/react": "^9.3.2", + "@testing-library/user-event": "^7.1.2", "autosuggest-highlight": "^3.1.1", "base-64": "^0.1.0", "chroma-js": "^2.0.3", @@ -32,16 +29,19 @@ "pace-js": "^1.0.2", "piwik-react-router": "^0.12.1", "qs": "^6.8.0", + "react": "^16.13.1", "react-app-polyfill": "^1.0.1", "react-autosuggest": "^9.4.3", "react-cookie": "^3.0.8", "react-copy-to-clipboard": "^5.0.1", + "react-dom": "^16.13.1", "react-dropzone": "^5.0.1", "react-highlight": "^0.12.0", "react-infinite-scroller": "^1.2.4", "react-json-view": "^1.19.1", "react-keycloak": "^6.1.0", "react-router-dom": "^5.1.2", + "react-scripts": "3.4.1", "react-swipeable-views": "^0.13.0", "recompose": "^0.28.2", "swagger-client": "^3.8.22", @@ -65,7 +65,7 @@ "eslint-plugin-import": "^2.14.0", "eslint-plugin-node": "^8.0.1", "eslint-plugin-promise": "^3.7.0", - "eslint-plugin-react": "^7.11.1", + "eslint-plugin-react": "^7.20.5", "eslint-plugin-standard": "^3.1.0", "react-docgen": "^5.3.0", "serve": "^10.0.0" diff --git a/gui/src/components/About.js b/gui/src/components/About.js index e8682a8d8ce5f5c62a04ae4ca6331023837be72e..34d3db5ab13c5a46336117a2f93f9ed5f8173fce 100644 --- a/gui/src/components/About.js +++ b/gui/src/components/About.js @@ -228,7 +228,7 @@ export default function About() { {` ### Getting Help If you encounter any difficulties, please write to - [webmaster@nomad-coe.eu](mailto:webmaster@nomad-coe.eu). If you think + [support@nomad-lab.eu](mailto:support@nomad-lab.eu). If you think that this web-page is not working as expected, or if you want to start a discussion about possible features, feel free to open an issue on our [issue tracking system](https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-FAIR/issues). diff --git a/gui/src/components/App.js b/gui/src/components/App.js index f2e287ae7797a7917a7cb4c35839e85a628a2fea..5372b326676f8b55118f3aeb44069c9db88d117a 100644 --- a/gui/src/components/App.js +++ b/gui/src/components/App.js @@ -1,4 +1,4 @@ -import React, { useEffect, useState, useContext, useCallback, useRef } from 'react' +import React, { useEffect, useState, useContext, useCallback, useRef, useMemo } from 'react' import PropTypes from 'prop-types' import { compose } from 'recompose' import classNames from 'classnames' @@ -154,7 +154,10 @@ function Consent() { const [cookies, setCookie] = useCookies() const [accepted, setAccepted] = useState(cookies['terms-accepted']) const [optOut, setOptOut] = useState(cookies['tracking-enabled'] === 'false') - const forever = new Date(2147483647 * 1000) + const cookieOptions = useMemo(() => ({ + expires: new Date(2147483647 * 1000), + path: '/' + guiBase.split('/').slice(1).join('/') + }), []) useEffect(() => { if (!optOut) { @@ -164,15 +167,23 @@ function Consent() { } }) + // Write again to push forwards Safari's hard-coded 7 days ITP window + useEffect(() => { + setCookie('terms-accepted', cookies['terms-accepted'], cookieOptions) + setCookie('tracking-enabled', cookies['tracking-enabled'], cookieOptions) + }, + // eslint-disable-next-line react-hooks/exhaustive-deps + []) + const handleClosed = accepted => { if (accepted) { - setCookie('terms-accepted', true, {expires: forever}) - setCookie('tracking-enabled', !optOut, {expires: forever}) + setCookie('terms-accepted', true, cookieOptions) + setCookie('tracking-enabled', !optOut, cookieOptions) setAccepted(true) } } const handleOpen = () => { - setCookie('terms-accepted', false) + setCookie('terms-accepted', false, cookieOptions) setAccepted(false) } diff --git a/gui/src/config.js b/gui/src/config.js index 68018ad4920c37ca29653948f8636f3b7ae214ea..e53e0ab5538966b767a410297c3c60ce095c7d86 100644 --- a/gui/src/config.js +++ b/gui/src/config.js @@ -15,7 +15,7 @@ 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 email = 'support@nomad-lab.eu' export const maxLogsToShow = 50 export const consent = ` diff --git a/gui/yarn.lock b/gui/yarn.lock index f5ac1042777c15504372b58e262e0fa880f8a607..4ee8d163d15e77e0cf29a601034b1381fc1101c7 100644 --- a/gui/yarn.lock +++ b/gui/yarn.lock @@ -2251,6 +2251,15 @@ array.prototype.flat@^1.2.1: define-properties "^1.1.3" es-abstract "^1.17.0-next.1" +array.prototype.flatmap@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.2.3.tgz#1c13f84a178566042dd63de4414440db9222e443" + integrity sha512-OOEk+lkePcg+ODXIpvuU9PAryCikCJyo7GlDG1upleEpQRx6mzL9puEBkozQ5iAx20KV0l3DbyQwqciJtqe5Pg== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + function-bind "^1.1.1" + arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" @@ -4808,7 +4817,7 @@ eslint-plugin-react-hooks@^1.6.1: resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-1.7.0.tgz#6210b6d5a37205f0b92858f895a4e827020a7d04" integrity sha512-iXTCFcOmlWvw4+TOE8CLWj6yX1GwzT0Y6cUfHHZqWnSk144VmVIRcVGtUAzrLES7C798lmvnt02C7rxaOX1HNA== -eslint-plugin-react@7.19.0, eslint-plugin-react@^7.11.1: +eslint-plugin-react@7.19.0: version "7.19.0" resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.19.0.tgz#6d08f9673628aa69c5559d33489e855d83551666" integrity sha512-SPT8j72CGuAP+JFbT0sJHOB80TX/pu44gQ4vXH/cq+hQTiY2PuZ6IHkqXJV6x1b28GDdo1lbInjKUrrdUf0LOQ== @@ -4826,6 +4835,23 @@ eslint-plugin-react@7.19.0, eslint-plugin-react@^7.11.1: string.prototype.matchall "^4.0.2" xregexp "^4.3.0" +eslint-plugin-react@^7.20.5: + version "7.20.5" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.20.5.tgz#29480f3071f64a04b2c3d99d9b460ce0f76fb857" + integrity sha512-ajbJfHuFnpVNJjhyrfq+pH1C0gLc2y94OiCbAXT5O0J0YCKaFEHDV8+3+mDOr+w8WguRX+vSs1bM2BDG0VLvCw== + dependencies: + array-includes "^3.1.1" + array.prototype.flatmap "^1.2.3" + doctrine "^2.1.0" + has "^1.0.3" + jsx-ast-utils "^2.4.1" + object.entries "^1.1.2" + object.fromentries "^2.0.2" + object.values "^1.1.1" + prop-types "^15.7.2" + resolve "^1.17.0" + string.prototype.matchall "^4.0.2" + eslint-plugin-standard@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-3.1.0.tgz#2a9e21259ba4c47c02d53b2d0c9135d4b1022d47" @@ -7352,6 +7378,14 @@ jsx-ast-utils@^2.2.1, jsx-ast-utils@^2.2.3: array-includes "^3.0.3" object.assign "^4.1.0" +jsx-ast-utils@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-2.4.1.tgz#1114a4c1209481db06c690c2b4f488cc665f657e" + integrity sha512-z1xSldJ6imESSzOjd3NNkieVJKRlKYSOtMG8SFyCj2FIrvSaSuli/WjpBkEzCBoR9bYYYFgqJw61Xhu7Lcgk+w== + dependencies: + array-includes "^3.1.1" + object.assign "^4.1.0" + keycloak-js@^6.0.0: version "6.0.1" resolved "https://registry.yarnpkg.com/keycloak-js/-/keycloak-js-6.0.1.tgz#329a5e77210dfc4a7d4acf96f95dd0132455bea3" @@ -8274,6 +8308,15 @@ object.entries@^1.1.0, object.entries@^1.1.1: function-bind "^1.1.1" has "^1.0.3" +object.entries@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.2.tgz#bc73f00acb6b6bb16c203434b10f9a7e797d3add" + integrity sha512-BQdB9qKmb/HyNdMNWVr7O3+z5MUIx3aiegEIJqjMBbBf0YT9RRxTJSim4mzFqtyr7PDAHigq0N9dO0m0tRakQA== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + has "^1.0.3" + object.fromentries@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.2.tgz#4a09c9b9bb3843dd0f89acdb517a794d4f355ac9" @@ -10474,7 +10517,7 @@ resolve@1.15.0: dependencies: path-parse "^1.0.6" -resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.15.1, resolve@^1.3.2, resolve@^1.8.1: +resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.15.1, resolve@^1.17.0, resolve@^1.3.2, resolve@^1.8.1: version "1.17.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== diff --git a/nomad/config.py b/nomad/config.py index a13acd39606e63ced7e579d8a4544636c9ce08f9..3f9e42d5655af39aa013a653d61929387c52d895 100644 --- a/nomad/config.py +++ b/nomad/config.py @@ -210,8 +210,8 @@ mail = NomadConfig( port=8995, user='', password='', - from_address='webmaster@nomad-coe.eu', - cc_address='webmaster@nomad-coe.eu' + from_address='support@nomad-lab.eu', + cc_address='support@nomad-lab.eu' ) normalize = NomadConfig( diff --git a/ops/containers/keycloak/fairdi_nomad_prod.json b/ops/containers/keycloak/fairdi_nomad_prod.json index ad25e8917e0de7a0f5c348d10cbaaad435dc14ab..0f910d1d75f12ca883418dd92c67455fc3c767bb 100644 --- a/ops/containers/keycloak/fairdi_nomad_prod.json +++ b/ops/containers/keycloak/fairdi_nomad_prod.json @@ -1192,8 +1192,8 @@ "auth": "", "port": "25", "host": "mailrelay.mpcdf.mpg.de", - "replyTo": "webmaster@nomad-coe.eu", - "from": "webmaster@nomad-coe.eu", + "replyTo": "support@nomad-lab.eu", + "from": "support@nomad-lab.eu", "fromDisplayName": "The nomad team", "ssl": "" }, diff --git a/ops/containers/keycloak/fairdi_nomad_test.json b/ops/containers/keycloak/fairdi_nomad_test.json index dfd85979d323b5189f6427fa8404f4789f195953..1b01d463db5a951a9202e7a97470f0b7789c8b7d 100644 --- a/ops/containers/keycloak/fairdi_nomad_test.json +++ b/ops/containers/keycloak/fairdi_nomad_test.json @@ -1249,8 +1249,8 @@ "auth": "", "port": "25", "host": "mailrelay.mpcdf.mpg.de", - "replyTo": "webmaster@nomad-coe.eu", - "from": "webmaster@nomad-coe.eu", + "replyTo": "support@nomad-lab.eu", + "from": "support@nomad-lab.eu", "fromDisplayName": "The nomad team", "ssl": "" }, diff --git a/ops/docker-compose/nomad-oasis/README.md b/ops/docker-compose/nomad-oasis/README.md index 2a375787c81bee119ba78a42077b922e464064a1..75b87ad91bfe8c5603ceb1d85aa0c18caad2834b 100644 --- a/ops/docker-compose/nomad-oasis/README.md +++ b/ops/docker-compose/nomad-oasis/README.md @@ -41,7 +41,7 @@ All docker container are configured via docker-compose an the respective `docker Further, we will need to mount some configuration files to configure the NOMAD services within their respective containers. -Please [write us](mailto:webmaster@nomad-coe.eu) to register your NOMAD account as an OASIS +Please [write us](mailto:support@nomad-lab.eu) to register your NOMAD account as an OASIS admin and to register your hostname. Please replace the indicated configuration items with the right information. diff --git a/ops/helm/nomad/values.yaml b/ops/helm/nomad/values.yaml index 82d2447c84fb4ca5044d4f024fcc3e164454f5f6..ffb9c6a109dc1aeea16dd20de98c1c52151bd093 100644 --- a/ops/helm/nomad/values.yaml +++ b/ops/helm/nomad/values.yaml @@ -144,7 +144,7 @@ mail: enabled: "false" host: 'localhost' port: 25 - from: 'webmaster@nomad-coe.eu' + from: 'support@nomad-lab.eu' client: username: admin