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

Minor fixes to GUI.

parent 0e108ee0
Pipeline #69453 passed with stages
in 17 minutes and 12 seconds
......@@ -9,6 +9,7 @@ import SearchContext from './search/SearchContext'
import { Typography } from '@material-ui/core'
import { DatasetActions, DOI } from './search/DatasetList'
import { withRouter } from 'react-router'
import { withDomain } from './domains'
export const help = `
This page allows you to **inspect** and **download** NOMAD datasets. It alsow allows you
......@@ -21,7 +22,8 @@ class DatasetPage extends React.Component {
api: PropTypes.object.isRequired,
datasetId: PropTypes.string.isRequired,
raiseError: PropTypes.func.isRequired,
history: PropTypes.object.isRequired
history: PropTypes.object.isRequired,
domain: PropTypes.object.isRequired
}
static styles = theme => ({
......@@ -89,7 +91,7 @@ class DatasetPage extends React.Component {
}
render() {
const { classes, datasetId } = this.props
const { classes, datasetId, domain } = this.props
const { dataset, update, empty } = this.state
return (
......@@ -115,11 +117,16 @@ class DatasetPage extends React.Component {
query={{dataset_id: datasetId}}
ownerTypes={['all', 'public']} update={update}
>
<Search resultTab="entries" tabs={['entries', 'groups', 'datasets']} />
<Search
resultTab="entries" tabs={['entries', 'groups', 'datasets']}
entryListProps={{
selectedColumns: [...domain.defaultSearchResultColumns, 'published', 'authors']
}}
/>
</SearchContext>
</div>
)
}
}
export default compose(withRouter, withApi(false), withErrors, withStyles(DatasetPage.styles))(DatasetPage)
export default compose(withRouter, withDomain, withApi(false), withErrors, withStyles(DatasetPage.styles))(DatasetPage)
......@@ -57,9 +57,9 @@ class RepoEntryView extends React.Component {
update() {
const {uploadId, calcId} = this.props
this.props.api.repo(uploadId, calcId).then(data => {
this.setState({calcData: data})
this.setState({calcData: data, doesNotExist: false})
}).catch(error => {
this.setState({calcData: null})
this.setState({calcData: null, doesNotExist: false})
if (error.name === 'DoesNotExist') {
this.setState({doesNotExist: true})
} else {
......
......@@ -323,8 +323,7 @@ export class EntryListUnstyled extends React.Component {
}
const defaultSelectedColumns = this.props.selectedColumns || [
...domain.defaultSearchResultColumns,
'published', 'authors']
...domain.defaultSearchResultColumns, 'authors']
const pagination = <TablePagination
count={totalNumber}
......
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