Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
76a5684f
Commit
76a5684f
authored
1 year ago
by
vkovtun
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-13579: Reusing the existing Grid component for the grid view.
parent
07ab325e
No related branches found
No related tags found
1 merge request
!40
SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ui-admin/src/js/components/database/DatabaseComponent.jsx
+1
-1
1 addition, 1 deletion
ui-admin/src/js/components/database/DatabaseComponent.jsx
ui-admin/src/js/components/database/data-browser/DataBrowser.jsx
+47
-12
47 additions, 12 deletions
...n/src/js/components/database/data-browser/DataBrowser.jsx
with
48 additions
and
13 deletions
ui-admin/src/js/components/database/DatabaseComponent.jsx
+
1
−
1
View file @
76a5684f
...
...
@@ -79,7 +79,7 @@ class DatabaseComponent extends React.PureComponent {
return
(
this
.
state
.
showDataBrowser
?
<
DataBrowser
viewType
=
'
grid
'
/>
<
DataBrowser
viewType
=
'
list
'
/>
:
<
Container
>
<
pre
>
{
JSON
.
stringify
(
this
.
state
.
json
||
{},
null
,
2
)
}
</
pre
>
...
...
This diff is collapsed.
Click to expand it.
ui-admin/src/js/components/database/data-browser/DataBrowser.jsx
+
47
−
12
View file @
76a5684f
...
...
@@ -2,13 +2,15 @@ import React from 'react'
import
{
withStyles
}
from
'
@material-ui/core/styles
'
import
autoBind
from
'
auto-bind
'
import
Toolbar
from
'
@src/js/components/database/data-browser/Toolbar.jsx
'
import
ListView
from
'
@src/js/components/database/data-browser/ListView.jsx
'
import
GridView
from
'
@src/js/components/database/data-browser/GridView.jsx
'
import
DescriptionIcon
from
'
@material-ui/icons/DescriptionOutlined
'
import
AudioIcon
from
'
@material-ui/icons/MusicNoteOutlined
'
import
VideoIcon
from
'
@material-ui/icons/LocalMovies
'
import
ImageIcon
from
'
@material-ui/icons/Image
'
import
Paper
from
"
@material-ui/core/Paper
"
;
import
Paper
from
'
@material-ui/core/Paper
'
import
Grid
from
'
@src/js/components/common/grid/Grid.jsx
'
import
GridFilterOptions
from
'
@src/js/components/common/grid/GridFilterOptions.js
'
import
AppController
from
'
@src/js/components/AppController.js
'
const
styles
=
theme
=>
({
boundary
:
{
...
...
@@ -118,6 +120,14 @@ class DataBrowser extends React.Component {
// TODO: implement
}
async
load
(
params
)
{
return
await
this
.
state
.
files
;
}
async
onError
(
error
)
{
await
AppController
.
getInstance
().
errorChange
(
error
)
}
render
()
{
const
{
viewType
,
files
,
selectedFile
,
multiselectedFiles
}
=
this
.
state
const
{
classes
}
=
this
.
props
...
...
@@ -129,17 +139,42 @@ class DataBrowser extends React.Component {
onViewTypeChange
=
{
this
.
handleViewTypeChange
}
/>
{
viewType
===
'
list
'
&&
(
<
ListView
clickable
=
{
true
}
<
Grid
// id={id}
// settingsId={id}
filterModes
=
{
[
GridFilterOptions
.
COLUMN_FILTERS
]
}
header
=
'Files'
columns
=
{
[
{
name
:
'
name
'
,
label
:
'
Name
'
,
sortable
:
true
,
getValue
:
({
row
})
=>
row
.
name
,
renderValue
:
({
value
})
=>
value
,
renderFilter
:
null
},
{
name
:
'
size
'
,
label
:
'
Size
'
,
sortable
:
true
,
getValue
:
({
row
})
=>
row
.
size
},
{
name
:
'
modified
'
,
label
:
'
Modified
'
,
sortable
:
false
,
getValue
:
({
row
})
=>
row
.
lastModifiedTime
.
toLocaleString
()
},
]
}
loadRows
=
{
this
.
load
}
sort
=
'registrationDate'
sortDirection
=
'desc'
exportable
=
{
false
}
selectable
=
{
true
}
multiselectable
=
{
true
}
onClick
=
{
this
.
handleClick
}
onSelect
=
{
this
.
handleSelect
}
onMultiselect
=
{
this
.
handleMultiselect
}
configuration
=
{
configuration
}
files
=
{
files
}
selectedFile
=
{
selectedFile
}
multiselectedFiles
=
{
multiselectedFiles
}
loadSettings
=
{
null
}
onSettingsChange
=
{
null
}
onError
=
{
this
.
onError
}
exportXLS
=
{
null
}
/>
)
}
{
viewType
===
'
grid
'
&&
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment