Commit f04e609b authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Fixed further GUI issues for beta test.

parent a46b9454
Pipeline #48272 passed with stages
in 18 minutes and 30 seconds
......@@ -24,7 +24,7 @@ class DomainProviderBase extends React.Component {
DFT: {
name: 'DFT',
about: `
## The nomad**@FAIRDI** *beta* test
## The nomad**@FAIRDI** beta test
### About nomad@FAIRDI
......@@ -44,11 +44,17 @@ class DomainProviderBase extends React.Component {
capabilities to search and explore uploaded dat. But to add comments, co-authors, and references,
create data-sets, and manage your account you still have to use the original [Nomad Repository GUI](https://repository.nomad-coe.eu/NomadRepository-1.1).
### How to test the new upload
This GUI allows you to (menu on the left):
* About: read about this, access the documentation, and API.
* Search: inspect for existing data, your's and others.
* Upload: drop data, view the processing, and publish your uploads.
* Metainfo: browse the *metainfo*, Nomad's (meta-)data schema for processed data.
### How to test the new upload and processing
**!Please read this, before you explore this new part of Nomad!**
Try to explore this as *new user*. Travel through the menu on the left and just
Try to explore this as a *new user*. Travel through the menu on the left and just
use it. Feel free to upload data, look for limitations and things you do not like.
The goal should be to figure out what is wrong and missing.
......@@ -57,11 +63,11 @@ class DomainProviderBase extends React.Component {
you can use our test user: \`leonard.hofstadter@nomad-fairdi.tests.de\`, the password
is \`password\`.
* This is not yet connected to the actual Nomad Repository. Everything you upload
will only appear here and will be removed after this first testing period.
will only appear here and might be removed after this first testing period.
* Now all existing entries from the original Nomad appear in the search, since we
are still migrating data.
For feedback and any issues you find, feel free to open an issue [here](https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-FAIR/issues) or write
For feedback and any issues you find, feel free to [open an issue](https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-FAIR/issues) or write
an email to [markus.scheidgen@physik.hu-berlin.de](mailto:markus.scheidgen@physik.hu-berlin.de).
### Mid- and long term goals of nomad@FAIRDI
......@@ -89,23 +95,28 @@ class DomainProviderBase extends React.Component {
searchMetrics: {
code_runs: {
label: 'Entries',
renderResultString: count => (<span><b>{count}</b> entries</span>)
tooltip: 'The statistics will show the number of database entry. Each set of input/output files that represents a code run is an entry.',
renderResultString: count => (<span><b>{count.toLocaleString()}</b> entries</span>)
},
unique_code_runs: {
label: 'Unique entries',
renderResultString: count => (<span> and <b>{count}</b> unique entries</span>)
tooltip: 'Counts duplicates only once.',
renderResultString: count => (<span> and <b>{count.toLocaleString()}</b> unique entries</span>)
},
total_energies: {
label: 'Total energy calculations',
renderResultString: count => (<span> with <b>{count}</b> total energy calculations</span>)
tooltip: 'Aggregates the number of total energy calculations as each entry can contain many calculations.',
renderResultString: count => (<span> with <b>{count.toLocaleString()}</b> total energy calculations</span>)
},
geometries: {
label: 'Unique geometries',
renderResultString: count => (<span> that simulate <b>{count}</b> unique geometries</span>)
tooltip: 'Aggregates the number of unique simulated system geometries in all entries.',
renderResultString: count => (<span> that simulate <b>{count.toLocaleString()}</b> unique geometries</span>)
},
datasets: {
label: 'Datasets',
renderResultString: count => (<span> curated in <b>{count}</b> datasets</span>)
tooltip: 'Shows statistics in terms of datasets that entries belong to.',
renderResultString: count => (<span> curated in <b>{count.toLocaleString()}</b> datasets</span>)
}
},
/**
......@@ -182,10 +193,12 @@ class DomainProviderBase extends React.Component {
searchMetrics: {
code_runs: {
label: 'Entries',
tooltip: 'Statistics will show the number of database entry. Usually each entry represents a single experiment.',
renderResultString: count => (<span><b>{count}</b> entries</span>)
},
datasets: {
label: 'Datasets',
tooltip: 'Shows statistics in terms of datasets that entries belong to.',
renderResultString: count => (<span> curated in <b>{count}</b> datasets</span>)
}
},
......
......@@ -65,10 +65,12 @@ class QuantityHistogram extends React.Component {
const width = this.container.current.offsetWidth
const height = Object.keys(this.props.data).length * 32
const data = Object.keys(this.props.data).map(key => ({
name: key,
value: this.props.data[key][this.props.metric]
}))
const data = Object.keys(this.props.data)
.map(key => ({
name: key,
value: this.props.data[key][this.props.metric]
}))
.filter(d => d.value !== 0)
data.sort((a, b) => {
const nameA = a.name
......
import React from 'react'
import PropTypes from 'prop-types'
import { withStyles, FormControl, FormLabel, FormGroup, FormControlLabel, Checkbox } from '@material-ui/core'
import { withStyles, FormControl, FormLabel, FormGroup, FormControlLabel, Checkbox, Tooltip } from '@material-ui/core'
import { withDomain } from '../domains'
import { compose } from 'recompose'
......@@ -49,12 +49,14 @@ class SearchAggregationsUnstyled extends React.Component {
<FormLabel>Metric used in statistics: </FormLabel>
<FormGroup row>
{Object.keys(metricsDefinitions).map(metric => (
<FormControlLabel key={metric}
control={
<Checkbox checked={selectedMetric === metric} onChange={() => this.handleMetricChange(metric)} value={metric} />
}
label={metricsDefinitions[metric].label}
/>
<Tooltip key={metric} title={metricsDefinitions[metric].tooltip}>
<FormControlLabel
control={
<Checkbox checked={selectedMetric === metric} onChange={() => this.handleMetricChange(metric)} value={metric} />
}
label={metricsDefinitions[metric].label}
/>
</Tooltip>
))}
</FormGroup>
</FormControl>
......
......@@ -151,9 +151,19 @@ class SearchPage extends React.Component {
all: 'All entries',
public: 'Only public entries',
user: 'Only your entries',
staging: 'Only entries from your staging area'
staging: 'Staging area only'
}
const ownerTooltips = {
migrated: 'Only show entries with established provenance in the original Nomad repository.',
all: 'This will show all entries in the database, even those that might be duplicates.',
public: 'Do not show entries that are only visible to you.',
user: 'Do only show entries visible to you.',
staging: 'Will only show entries that you uploaded, but not yet published.'
}
const withoutLogin = ['migrated', 'all']
const useMetric = Object.keys(metrics).find(metric => metric !== 'code_runs') || 'code_runs'
const helperText = <span>
There are {Object.keys(domain.searchMetrics).map(key => {
......@@ -195,23 +205,25 @@ class SearchPage extends React.Component {
`}</Help>
<DisableOnLoading>
{ user
? <div className={classes.searchEntry}>
<FormControl>
<FormLabel>Filter entries and show: </FormLabel>
<FormGroup row>
{['migrated', 'all', 'public', 'user', 'staging'].map(owner => (
<FormControlLabel key={owner}
control={
<Checkbox checked={this.state.owner === owner} onChange={() => this.handleOwnerChange(owner)} value="owner" />
}
label={ownerLabel[owner]}
/>
<div className={classes.searchEntry}>
<FormControl>
<FormLabel>Filter entries and show: </FormLabel>
<FormGroup row>
{['migrated', 'all', 'public', 'user', 'staging']
.filter(key => user || withoutLogin.indexOf(key) !== -1)
.map(owner => (
<Tooltip key={owner} title={ownerTooltips[owner]}>
<FormControlLabel
control={
<Checkbox checked={this.state.owner === owner} onChange={() => this.handleOwnerChange(owner)} value="owner" />
}
label={ownerLabel[owner]}
/>
</Tooltip>
))}
</FormGroup>
</FormControl>
</div> : ''
}
</FormGroup>
</FormControl>
</div>
<div className={classes.search}>
<SearchBar classes={{autosuggestRoot: classes.searchBar}}
......
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