Skip to content
Snippets Groups Projects
Commit 9b708f41 authored by piotr.kupczyk@id.ethz.ch's avatar piotr.kupczyk@id.ethz.ch
Browse files

SSDM-13133 : Add info to Admin UI : registrator, registrationDate for plugins and queries

parent 0bddc543
No related branches found
No related tags found
1 merge request!40SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
......@@ -4,6 +4,7 @@ import GridExportOptions from '@src/js/components/common/grid/GridExportOptions.
import PluginLink from '@src/js/components/common/link/PluginLink.jsx'
import UserLink from '@src/js/components/common/link/UserLink.jsx'
import EntityKind from '@src/js/components/common/dto/EntityKind.js'
import date from '@src/js/common/date.js'
import openbis from '@src/js/services/openbis.js'
import messages from '@src/js/common/messages.js'
import logger from '@src/js/common/logger.js'
......@@ -68,6 +69,11 @@ class PluginsGrid extends React.PureComponent {
renderValue: ({ value }) => {
return <UserLink userId={value} />
}
},
{
name: 'registrationDate',
label: messages.get(messages.REGISTRATION_DATE),
getValue: ({ row }) => date.format(row.registrationDate.value)
}
]}
rows={rows}
......
......@@ -4,6 +4,7 @@ import GridExportOptions from '@src/js/components/common/grid/GridExportOptions.
import QueryLink from '@src/js/components/common/link/QueryLink.jsx'
import UserLink from '@src/js/components/common/link/UserLink.jsx'
import QueryType from '@src/js/components/common/dto/QueryType.js'
import date from '@src/js/common/date.js'
import messages from '@src/js/common/messages.js'
import logger from '@src/js/common/logger.js'
......@@ -62,6 +63,11 @@ class QueriesGrid extends React.PureComponent {
renderValue: ({ value }) => {
return <UserLink userId={value} />
}
},
{
name: 'registrationDate',
label: messages.get(messages.REGISTRATION_DATE),
getValue: ({ row }) => date.format(row.registrationDate.value)
}
]}
rows={rows}
......
......@@ -115,6 +115,9 @@ class ToolSearch extends React.Component {
script: FormUtil.createField({ value: _.get(plugin, 'script') }),
registrator: FormUtil.createField({
value: _.get(plugin, 'registrator.userId')
}),
registrationDate: FormUtil.createField({
value: _.get(plugin, 'registrationDate')
})
}
})
......@@ -158,6 +161,9 @@ class ToolSearch extends React.Component {
}),
registrator: FormUtil.createField({
value: _.get(query, 'registrator.userId')
}),
registrationDate: FormUtil.createField({
value: _.get(query, 'registrationDate')
})
}))
......
......@@ -80,6 +80,10 @@ async function testLoadWithSearchText(resultsFound) {
{
name: 'registrator',
label: 'Registrator'
},
{
name: 'registrationDate',
label: 'Registration Date'
}
],
rows: [
......@@ -124,6 +128,10 @@ async function testLoadWithSearchText(resultsFound) {
{
name: 'registrator',
label: 'Registrator'
},
{
name: 'registrationDate',
label: 'Registration Date'
}
],
rows: [
......@@ -167,6 +175,10 @@ async function testLoadWithSearchText(resultsFound) {
{
name: 'registrator',
label: 'Registrator'
},
{
name: 'registrationDate',
label: 'Registration Date'
}
],
rows: [
......@@ -230,6 +242,10 @@ async function testLoadWithObjectType(resultsFound) {
{
name: 'registrator',
label: 'Registrator'
},
{
name: 'registrationDate',
label: 'Registration Date'
}
],
rows: resultsFound
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment