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

Merge branch 'v0.7.5' into 'master'

V0.7.5

See merge request !90
parents f3ee41d2 bfa4100c
Pipeline #69106 passed with stages
in 16 minutes and 47 seconds
......@@ -3,6 +3,8 @@ import { withStyles, Button, IconButton, Dialog, DialogTitle, DialogContent, Dia
import Markdown from './Markdown'
import PropTypes from 'prop-types'
import HelpIcon from '@material-ui/icons/Help'
import { compose } from 'recompose'
import { withDomain } from './domains'
export const HelpContext = React.createContext()
......@@ -10,9 +12,10 @@ class HelpDialogUnstyled extends React.Component {
static propTypes = {
classes: PropTypes.object.isRequired,
title: PropTypes.string,
content: PropTypes.string.isRequired,
content: PropTypes.func.isRequired,
icon: PropTypes.node,
maxWidth: PropTypes.string
maxWidth: PropTypes.string,
domain: PropTypes.object.isRequired
}
static styles = theme => ({
......@@ -38,7 +41,7 @@ class HelpDialogUnstyled extends React.Component {
}
render() {
const {classes, title, content, icon, maxWidth, ...rest} = this.props
const {classes, title, content, icon, maxWidth, domain, ...rest} = this.props
return (
<div className={classes.root}>
<Tooltip title={title}>
......@@ -53,7 +56,7 @@ class HelpDialogUnstyled extends React.Component {
>
<DialogTitle>{title || 'Help'}</DialogTitle>
<DialogContent>
<Markdown>{content}</Markdown>
<Markdown>{content(domain)}</Markdown>
</DialogContent>
<DialogActions>
<Button onClick={() => this.handleClose()} color="primary">
......@@ -66,4 +69,4 @@ class HelpDialogUnstyled extends React.Component {
}
}
export default withStyles(HelpDialogUnstyled.styles)(HelpDialogUnstyled)
export default compose(withDomain, withStyles(HelpDialogUnstyled.styles))(HelpDialogUnstyled)
......@@ -3,7 +3,7 @@ import { withApi } from './api'
import Search from './search/Search'
import SearchContext from './search/SearchContext'
export const help = `
export const help = domain => `
This page allows you to **inspect** and **manage** you own data. It is similar to the
*search page*, but it will only show data that was uploaded by you or is shared with you.
......
......@@ -102,10 +102,10 @@ class DomainProviderBase extends React.Component {
defaultSearchMetric: 'code_runs',
additionalSearchKeys: {
raw_id: {},
external_id: {},
upload_id: {},
calc_id: {},
paths: {},
external_id: {},
pid: {},
mainfile: {},
calc_hash: {},
......@@ -115,7 +115,6 @@ class DomainProviderBase extends React.Component {
spacegroup: {},
spacegroup_symbol: {},
labels: {},
raw_id: {},
upload_name: {}
},
/**
......
......@@ -10,7 +10,7 @@ import qs from 'qs'
import KeepState from '../KeepState'
import { guiBase } from '../../config'
export const help=`
export const help = domain => `
The *raw files* tab, will show you all files that belong to the entry and offers a download
on individual, or all files. The files can be selected and downloaded. You can also
view the contents of some files directly here on this page.
......
......@@ -132,16 +132,16 @@ class RepoEntryView extends React.Component {
<Quantity column style={{maxWidth: 350}}>
<Quantity quantity="calc_id" label={`${domain.entryLabel} id`} noWrap withClipboard {...quantityProps} />
<Quantity quantity="pid" label='PID' loading={loading} placeholder="not yet assigned" noWrap {...quantityProps} withClipboard />
<Quantity quantity="raw_id" label='raw id' loading={loading} noWrap {...quantityProps} withClipboard />
<Quantity quantity="external_id" label='external id' loading={loading} noWrap {...quantityProps} withClipboard />
<Quantity quantity="mainfile" loading={loading} noWrap ellipsisFront {...quantityProps} withClipboard />
<Quantity quantity="calc_hash" label={`${domain.entryLabel} hash`} loading={loading} noWrap {...quantityProps} />
<Quantity quantity="upload_id" label='upload id' {...quantityProps} noWrap withClipboard />
<Quantity quantity="upload_time" label='upload time' noWrap {...quantityProps} >
<Typography noWrap>
{new Date(calcData.upload_time * 1000).toLocaleString()}
</Typography>
</Quantity>
<Quantity quantity='mainfile' loading={loading} noWrap ellipsisFront {...quantityProps} withClipboard />
<Quantity quantity="calc_hash" label={`${domain.entryLabel} hash`} loading={loading} noWrap {...quantityProps} />
<Quantity quantity="raw_id" label='raw id' loading={loading} noWrap {...quantityProps} withClipboard />
<Quantity quantity="external_id" label='external id' loading={loading} noWrap {...quantityProps} withClipboard />
<Quantity quantity="last_processing" label='last processing' loading={loading} placeholder="not processed" noWrap {...quantityProps}>
<Typography noWrap>
{new Date(calcData.last_processing * 1000).toLocaleString()}
......
......@@ -9,7 +9,7 @@ import { FormControl, withStyles, Select, Input, MenuItem, ListItemText, InputLa
import { compose } from 'recompose'
import { schema } from '../MetaInfoRepository'
export const help = `
export const help = domain => `
The NOMAD *metainfo* defines all quantities used to represent archive data in
NOMAD. You could say it is the archive *schema*. You can browse this schema and
all its definitions here.
......
......@@ -264,18 +264,10 @@ export class EntryListUnstyled extends React.Component {
<Quantity column >
{/* <Quantity quantity="pid" label='PID' placeholder="not yet assigned" noWrap data={row} withClipboard /> */}
<Quantity quantity="calc_id" label={`${domain.entryLabel} id`} noWrap withClipboard data={row} />
<Quantity quantity="upload_id" label='upload id' data={row} noWrap withClipboard />
<Quantity quantity="raw_id" label={`raw id`} noWrap withClipboard data={row} />
<Quantity quantity="external_id" label={`external id`} noWrap withClipboard data={row} />
<Quantity quantity='mainfile' noWrap ellipsisFront data={row} withClipboard />
<Quantity quantity="upload_time" label='upload time' noWrap data={row} >
<Typography noWrap>
{new Date(row.upload_time * 1000).toLocaleString()}
</Typography>
</Quantity>
<Quantity quantity="last_processing" label='processing version' noWrap placeholder="not processed" data={row}>
<Typography noWrap>
{row.nomad_version}/{row.nomad_commit}
</Typography>
</Quantity>
<Quantity quantity="upload_id" label='upload id' data={row} noWrap withClipboard />
</Quantity>
</div>
</div>
......
......@@ -7,8 +7,9 @@ import { withApi } from '../api'
import Search from './Search'
import SearchContext from './SearchContext'
import qs from 'qs'
import { withDomain } from '../domains'
export const help = `
export const help = domain => `
This page allows you to **search** in NOMAD's data. The upper part of this page
gives you various options to enter and configure your search. The lower part
shows all data that fulfills your search criteria.
......@@ -29,6 +30,11 @@ The visual representations show metrics for all data that fit your criteria.
You can display *entries* (i.e. code runs), *unique entries*, and *datasets*.
Other more specific metrics might be available.
Some quantities have no autocompletion for their values. You can still search for them,
if you know exactly what you are looking for. To search for a particular entry by its id
for example, type \`calc_id=<the_id>\` and press entry (or select the respective item from the menu).
The usable *hidden* quantities are: ${Object.keys(domain.additionalSearchKeys).map(key => `\`${key}\``).join(', ')}.
The results tabs gives you a quick overview of all entries and datasets that fit your search.
You can click entries to see more details, download data, see the archive, etc. The *entries*
tab displays individual entries (i.e. code runs), the *grouped entries* tab will group
......@@ -53,7 +59,8 @@ class SearchPage extends React.Component {
user: PropTypes.object,
location: PropTypes.object,
raiseError: PropTypes.func.isRequired,
update: PropTypes.number
update: PropTypes.number,
domain: PropTypes.object
}
static styles = theme => ({
......@@ -93,4 +100,4 @@ class SearchPage extends React.Component {
}
}
export default compose(withApi(false), withErrors, withStyles(SearchPage.styles))(SearchPage)
export default compose(withDomain, withApi(false), withErrors, withStyles(SearchPage.styles))(SearchPage)
......@@ -17,7 +17,7 @@ import { CopyToClipboard } from 'react-copy-to-clipboard'
import { guiBase } from '../../config'
import qs from 'qs'
export const help = `
export const help = domain => `
NOMAD allows you to upload data. After upload, NOMAD will process your data: it will
identify the main output files of [supported codes](https://www.nomad-coe.eu/the-project/nomad-repository/nomad-repository-howtoupload)
and then it will parse these files. The result will be a list of entries (one per each identified mainfile).
......@@ -308,7 +308,7 @@ class UploadPage extends React.Component {
</Tooltip>
{/* <button>Copy to clipboard with button</button> */}
</CopyToClipboard>
<HelpDialog icon={<MoreIcon/>} maxWidth="md" title="Alternative shell commands" content={`
<HelpDialog icon={<MoreIcon/>} maxWidth="md" title="Alternative shell commands" content={domain => `
As an experienced shell and *curl* user, you can modify the commands to
your liking.
......
......@@ -315,7 +315,7 @@ class UploadListResource(Resource):
upload.process_upload()
logger.info('initiated processing')
if bool(request.args.get('token', False)):
if bool(request.args.get('token', False)) and request.headers.get('Accept', '') != 'application/json':
raise DisableMarshalling(
'''
Thanks for uploading your data to nomad.
......
......@@ -299,6 +299,9 @@ class Domain:
multi=True, argparse_action='split', elastic_search_type='terms'),
upload_time=DomainQuantity(
description='Search for the exact upload time.', elastic_search_type='terms'),
upload_name=DomainQuantity(
description='Search for the upload_name.',
multi=True, argparse_action='split', elastic_search_type='terms'),
calc_id=DomainQuantity(
description='Search for the calc_id.',
multi=True, argparse_action='split', elastic_search_type='terms'),
......
......@@ -29,6 +29,6 @@ ADD ./material_theme /opt/jboss/keycloak/themes/material
ADD ./registration_form_action/target/form-extension-1.0-SNAPSHOT.jar /opt/jboss/keycloak/standalone/deployments/form-extension-1.0-SNAPSHOT.jar
# Additing a bcrypt password hashing algorithm to reuse old repo users
RUN curl http://central.maven.org/maven2/org/mindrot/jbcrypt/0.4/jbcrypt-0.4.jar > /tmp/jbcrypt-0.4.jar
ADD ./jbcrypt-0.4.jar /tmp/jbcrypt-0.4.jar
RUN /opt/jboss/keycloak/bin/jboss-cli.sh --command="module add --name=org.mindrot.jbcrypt --resources=/tmp/jbcrypt-0.4.jar"
RUN curl -L https://github.com/leroyguillaume/keycloak-bcrypt/releases/download/1.1.0/keycloak-bcrypt-1.1.0.jar > /opt/jboss/keycloak/standalone/deployments/keycloak-bcrypt-1.1.0.jar
\ No newline at end of file
ADD ./keycloak-bcrypt-1.1.0.jar /opt/jboss/keycloak/standalone/deployments/keycloak-bcrypt-1.1.0.jar
\ No newline at end of file
This basically uses the "official" 7.0.0 keycloak with some additions
- material theme
- bcrypt support
- bcrypt support (https://github.com/leroyguillaume/keycloak-bcrypt/)
- a custom form action to check the username (that has to be build before building the image!)
- realm definitions for prod and test realm
- scripts for import and export of all users
......
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