Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
nomad-FAIR
Commits
03a23238
Commit
03a23238
authored
Jan 17, 2020
by
Markus Scheidgen
Browse files
Added button to entry actions.
parent
7b692409
Changes
3
Hide whitespace changes
Inline
Side-by-side
gui/src/components/DataTable.js
View file @
03a23238
...
...
@@ -265,17 +265,7 @@ class DataTableUnStyled extends React.Component {
width
:
1
},
details
:
{
borderBottom
:
'
1px solid rgba(224, 224, 224, 1)
'
,
padding
:
theme
.
spacing
.
unit
*
3
},
detailsContentsWithActions
:
{
paddingTop
:
theme
.
spacing
.
unit
*
3
,
paddingLeft
:
theme
.
spacing
.
unit
*
3
,
paddingRight
:
theme
.
spacing
.
unit
*
3
},
detailsActions
:
{
textAlign
:
'
right
'
,
padding
:
theme
.
spacing
.
unit
borderBottom
:
'
1px solid rgba(224, 224, 224, 1)
'
},
selectedEntryCell
:
{
color
:
theme
.
palette
.
primary
.
contrastText
,
...
...
gui/src/components/search/EntryList.js
View file @
03a23238
import
React
from
'
react
'
import
PropTypes
from
'
prop-types
'
import
{
withStyles
,
Link
,
Typography
,
Tooltip
,
IconButton
,
TablePagination
}
from
'
@material-ui/core
'
import
{
withStyles
,
Link
,
Typography
,
Tooltip
,
IconButton
,
TablePagination
,
Button
}
from
'
@material-ui/core
'
import
{
compose
}
from
'
recompose
'
import
{
withRouter
}
from
'
react-router
'
import
{
withDomain
}
from
'
../domains
'
...
...
@@ -36,10 +36,26 @@ export class EntryListUnstyled extends React.Component {
overflow
:
'
auto
'
},
entryDetails
:
{
paddingTop
:
theme
.
spacing
.
unit
*
3
,
paddingLeft
:
theme
.
spacing
.
unit
*
3
,
paddingRight
:
theme
.
spacing
.
unit
*
3
},
entryDetailsContents
:
{
display
:
'
flex
'
},
entryDetailsRow
:
{
paddingRight
:
theme
.
spacing
.
unit
*
3
},
entryDetailsActions
:
{
display
:
'
flex
'
,
flexBasis
:
'
auto
'
,
flexGrow
:
0
,
flexShrink
:
0
,
justifyContent
:
'
flex-end
'
,
marginBottom
:
theme
.
spacing
.
unit
,
marginLeft
:
theme
.
spacing
.
unit
/
2
,
marginRight
:
theme
.
spacing
.
unit
/
2
,
marginTop
:
theme
.
spacing
.
unit
}
})
...
...
@@ -171,82 +187,82 @@ export class EntryListUnstyled extends React.Component {
renderEntryDetails
(
row
)
{
const
{
classes
,
domain
}
=
this
.
props
return
(
<
div
className
=
{
classes
.
entryDetails
}
>
<
div
className
=
{
classes
.
entryDetailsRow
}
>
<
Quantity
column
>
<
Quantity
row
>
<
Quantity
quantity
=
"
formula
"
label
=
'
formula
'
noWrap
data
=
{
row
}
/
>
<
/Quantity
>
<
Quantity
row
>
<
Quantity
quantity
=
"
code_name
"
label
=
'
dft code
'
noWrap
data
=
{
row
}
/
>
<
Quantity
quantity
=
"
code_version
"
label
=
'
dft code version
'
noWrap
data
=
{
row
}
/
>
<
/Quantity
>
<
Quantity
row
>
<
Quantity
quantity
=
"
basis_set
"
label
=
'
basis set
'
noWrap
data
=
{
row
}
/
>
<
Quantity
quantity
=
"
xc_functional
"
label
=
'
xc functional
'
noWrap
data
=
{
row
}
/
>
<
div
className
=
{
classes
.
entryDetailsContents
}
>
<
div
className
=
{
classes
.
entryDetailsRow
}
>
<
Quantity
column
>
<
Quantity
row
>
<
Quantity
quantity
=
"
formula
"
label
=
'
formula
'
noWrap
data
=
{
row
}
/
>
<
/Quantity
>
<
Quantity
row
>
<
Quantity
quantity
=
"
code_name
"
label
=
'
dft code
'
noWrap
data
=
{
row
}
/
>
<
Quantity
quantity
=
"
code_version
"
label
=
'
dft code version
'
noWrap
data
=
{
row
}
/
>
<
/Quantity
>
<
Quantity
row
>
<
Quantity
quantity
=
"
basis_set
"
label
=
'
basis set
'
noWrap
data
=
{
row
}
/
>
<
Quantity
quantity
=
"
xc_functional
"
label
=
'
xc functional
'
noWrap
data
=
{
row
}
/
>
<
/Quantity
>
<
Quantity
row
>
<
Quantity
quantity
=
"
system
"
label
=
'
system type
'
noWrap
data
=
{
row
}
/
>
<
Quantity
quantity
=
"
crystal_system
"
label
=
'
crystal system
'
noWrap
data
=
{
row
}
/
>
<
Quantity
quantity
=
'
spacegroup_symbol
'
label
=
"
spacegroup
"
noWrap
data
=
{
row
}
>
<
Typography
noWrap
>
{
row
.
spacegroup_symbol
}
({
row
.
spacegroup
})
<
/Typography
>
<
/Quantity
>
<
/Quantity
>
<
/Quantity
>
<
Quantity
row
>
<
Quantity
quantity
=
"
system
"
label
=
'
system type
'
noWrap
data
=
{
row
}
/
>
<
Quantity
quantity
=
"
crystal_system
"
label
=
'
crystal system
'
noWrap
data
=
{
row
}
/
>
<
Quantity
quantity
=
'
spacegroup_symbol
'
label
=
"
spacegroup
"
noWrap
data
=
{
row
}
>
<
Typography
noWrap
>
{
row
.
spacegroup_symbol
}
({
row
.
spacegroup
})
<
/div
>
<
div
className
=
{
classes
.
entryDetailsRow
}
style
=
{{
flexGrow
:
1
}}
>
<
Quantity
className
=
{
classes
.
entryDetailsRow
}
column
>
<
Quantity
quantity
=
'
comment
'
placeholder
=
'
no comment
'
data
=
{
row
}
/
>
<
Quantity
quantity
=
'
references
'
placeholder
=
'
no references
'
data
=
{
row
}
>
<
div
style
=
{{
display
:
'
inline-grid
'
}}
>
{(
row
.
references
||
[]).
map
(
ref
=>
<
Typography
key
=
{
ref
}
noWrap
>
<
a
href
=
{
ref
}
>
{
ref
}
<
/a
>
<
/Typography>
)
}
<
/div
>
<
/Quantity
>
<
Quantity
quantity
=
'
authors
'
data
=
{
row
}
>
<
Typography
>
{(
row
.
authors
||
[]).
map
(
author
=>
author
.
name
).
join
(
'
;
'
)}
<
/Typography
>
<
/Quantity
>
<
Quantity
quantity
=
'
datasets
'
placeholder
=
'
no datasets
'
data
=
{
row
}
>
<
div
>
{(
row
.
datasets
||
[]).
map
(
ds
=>
(
<
Typography
key
=
{
ds
.
id
}
>
<
Link
component
=
{
RouterLink
}
to
=
{
`/dataset/id/
${
ds
.
id
}
`
}
>
{
ds
.
name
}
<
/Link
>
{
ds
.
doi
?
<
span
>&
nbsp
;
(
<
Link
href
=
{
ds
.
doi
}
>
{
ds
.
doi
}
<
/Link>
)
</
span
>
:
<
React
.
Fragment
/>
}
<
/Typography>
))
}
<
/div
>
<
/Quantity
>
<
/Quantity
>
<
/Quantity
>
<
/div
>
<
/div
>
<
div
className
=
{
classes
.
entryDetailsRow
}
style
=
{{
flexGrow
:
1
}}
>
<
Quantity
className
=
{
classes
.
entryDetailsRow
}
column
>
<
Quantity
quantity
=
'
comment
'
placeholder
=
'
no comment
'
data
=
{
row
}
/
>
<
Quantity
quantity
=
'
references
'
placeholder
=
'
no references
'
data
=
{
row
}
>
<
div
style
=
{{
display
:
'
inline-grid
'
}}
>
{(
row
.
references
||
[]).
map
(
ref
=>
<
Typography
key
=
{
ref
}
noWrap
>
<
a
href
=
{
ref
}
>
{
ref
}
<
/a
>
<
/Typography>
)
}
<
/div
>
<
/Quantity
>
<
Quantity
quantity
=
'
authors
'
data
=
{
row
}
>
<
Typography
>
{(
row
.
authors
||
[]).
map
(
author
=>
author
.
name
).
join
(
'
;
'
)}
<
/Typography
>
<
/Quantity
>
<
Quantity
quantity
=
'
datasets
'
placeholder
=
'
no datasets
'
data
=
{
row
}
>
<
div
>
{(
row
.
datasets
||
[]).
map
(
ds
=>
(
<
Typography
key
=
{
ds
.
id
}
>
<
Link
component
=
{
RouterLink
}
to
=
{
`/dataset/id/
${
ds
.
id
}
`
}
>
{
ds
.
name
}
<
/Link
>
{
ds
.
doi
?
<
span
>&
nbsp
;
(
<
Link
href
=
{
ds
.
doi
}
>
{
ds
.
doi
}
<
/Link>
)
</
span
>
:
<
React
.
Fragment
/>
}
<
/Typography>
))
}
<
/div
>
<
div
className
=
{
classes
.
entryDetailsRow
}
style
=
{{
maxWidth
:
'
33%
'
,
paddingRight
:
0
}}
>
<
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
=
'
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
>
<
/
div
>
<
/div
>
<
div
className
=
{
classes
.
entryDetailsRow
}
style
=
{{
maxWidth
:
'
33%
'
,
paddingRight
:
0
}}
>
<
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
=
'
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="calc_hash" label={`${domain.entryLabel} hash`} noWrap data={row} />
<Quantity quantity="raw_id" label='raw id' noWrap data={row} withClipboard />
<Quantity quantity="last_processing" label='last processing' placeholder="not processed" noWrap data={row}>
<Typography noWrap>
{new Date(row.last_processing * 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
>
<
div
className
=
{
classes
.
entryDetailsActions
}
>
<
Button
color
=
"
primary
"
onClick
=
{
event
=>
this
.
handleViewEntryPage
(
event
,
row
)}
>
Show
raw
files
and
archive
<
/Button
>
<
/div
>
<
/div>
)
}
...
...
@@ -258,7 +274,7 @@ export class EntryListUnstyled extends React.Component {
renderEntryActions
(
row
,
selected
)
{
if
(
!
this
.
props
.
showEntryActions
||
this
.
props
.
showEntryActions
(
row
))
{
return
<
Tooltip
title
=
"
View entry pag
e
"
>
return
<
Tooltip
title
=
"
Show raw files and archiv
e
"
>
<
IconButton
style
=
{
selected
?
{
color
:
'
white
'
}
:
null
}
onClick
=
{
event
=>
this
.
handleViewEntryPage
(
event
,
row
)}
>
<
DetailsIcon
/>
<
/IconButton
>
...
...
gui/src/components/search/GroupList.js
View file @
03a23238
...
...
@@ -25,7 +25,9 @@ class GroupUnstyled extends React.Component {
}
static
styles
=
theme
=>
({
root
:
{}
root
:
{
padding
:
theme
.
spacing
.
unit
*
3
}
})
state
=
{
...
...
@@ -70,8 +72,8 @@ class GroupUnstyled extends React.Component {
<
TableCell
>
{
entry
.
mainfile
}
<
/TableCell
>
<
TableCell
>
{
new
Date
(
entry
.
upload_time
).
toLocaleString
()}
<
/TableCell
>
<
TableCell
align
=
"
right
"
>
<
DownloadButton
query
=
{{
calc_id
:
entry
.
calc_id
}}
tooltip
=
"
Download
raw
files of this entry
"
/>
<
Tooltip
title
=
"
View entry pag
e
"
>
<
DownloadButton
query
=
{{
calc_id
:
entry
.
calc_id
}}
tooltip
=
"
Download files of this entry
"
/>
<
Tooltip
title
=
"
Show raw files and archiv
e
"
>
<
IconButton
onClick
=
{()
=>
history
.
push
(
`/entry/id/
${
entry
.
upload_id
}
/
${
entry
.
calc_id
}
`
)}
>
<
MoreIcon
/>
<
/IconButton
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment