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
e384ede7
Commit
e384ede7
authored
1 year ago
by
vkovtun
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-13579: Added loading dialog for copying, moving and renaming.
parent
fcba91e6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!40
SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ui-admin/src/js/components/database/data-browser/LeftToolbar.jsx
+26
-10
26 additions, 10 deletions
...n/src/js/components/database/data-browser/LeftToolbar.jsx
with
26 additions
and
10 deletions
ui-admin/src/js/components/database/data-browser/LeftToolbar.jsx
+
26
−
10
View file @
e384ede7
...
@@ -36,6 +36,7 @@ import Popover from '@material-ui/core/Popover'
...
@@ -36,6 +36,7 @@ import Popover from '@material-ui/core/Popover'
import
InputDialog
from
'
@src/js/components/common/dialog/InputDialog.jsx
'
import
InputDialog
from
'
@src/js/components/common/dialog/InputDialog.jsx
'
import
ConfirmationDialog
from
'
@src/js/components/common/dialog/ConfirmationDialog.jsx
'
import
ConfirmationDialog
from
'
@src/js/components/common/dialog/ConfirmationDialog.jsx
'
import
LocationDialog
from
'
@src/js/components/database/data-browser/LocationDialog.jsx
'
import
LocationDialog
from
'
@src/js/components/database/data-browser/LocationDialog.jsx
'
import
LoadingDialog
from
"
@src/js/components/common/loading/LoadingDialog.jsx
"
;
const
color
=
'
default
'
const
color
=
'
default
'
const
iconButtonSize
=
'
medium
'
const
iconButtonSize
=
'
medium
'
...
@@ -81,7 +82,8 @@ class LeftToolbar extends React.Component {
...
@@ -81,7 +82,8 @@ class LeftToolbar extends React.Component {
newFolderDialogOpen
:
false
,
newFolderDialogOpen
:
false
,
deleteDialogOpen
:
false
,
deleteDialogOpen
:
false
,
renameDialogOpen
:
false
,
renameDialogOpen
:
false
,
locationDialogMode
:
null
locationDialogMode
:
null
,
loading
:
false
}
}
this
.
controller
=
this
.
props
.
controller
this
.
controller
=
this
.
props
.
controller
...
@@ -125,7 +127,13 @@ class LeftToolbar extends React.Component {
...
@@ -125,7 +127,13 @@ class LeftToolbar extends React.Component {
const
{
multiselectedFiles
}
=
this
.
props
const
{
multiselectedFiles
}
=
this
.
props
const
oldName
=
multiselectedFiles
.
values
().
next
().
value
.
name
const
oldName
=
multiselectedFiles
.
values
().
next
().
value
.
name
this
.
closeRenameDialog
()
this
.
closeRenameDialog
()
await
this
.
controller
.
rename
(
oldName
,
newName
)
try
{
this
.
setState
({
loading
:
true
})
await
this
.
controller
.
rename
(
oldName
,
newName
)
}
finally
{
this
.
setState
({
loading
:
false
})
}
}
}
handleRenameCancel
()
{
handleRenameCancel
()
{
...
@@ -149,10 +157,15 @@ class LeftToolbar extends React.Component {
...
@@ -149,10 +157,15 @@ class LeftToolbar extends React.Component {
const
{
locationDialogMode
}
=
this
.
state
const
{
locationDialogMode
}
=
this
.
state
this
.
closeLocationDialog
()
this
.
closeLocationDialog
()
if
(
locationDialogMode
===
moveLocationMode
)
{
try
{
await
this
.
controller
.
move
(
multiselectedFiles
,
newPath
)
this
.
setState
({
loading
:
true
})
}
else
{
if
(
locationDialogMode
===
moveLocationMode
)
{
await
this
.
controller
.
copy
(
multiselectedFiles
,
newPath
)
await
this
.
controller
.
move
(
multiselectedFiles
,
newPath
)
}
else
{
await
this
.
controller
.
copy
(
multiselectedFiles
,
newPath
)
}
}
finally
{
this
.
setState
({
loading
:
false
})
}
}
}
}
...
@@ -379,15 +392,18 @@ class LeftToolbar extends React.Component {
...
@@ -379,15 +392,18 @@ class LeftToolbar extends React.Component {
logger
.
log
(
logger
.
DEBUG
,
'
LeftToolbar.render
'
)
logger
.
log
(
logger
.
DEBUG
,
'
LeftToolbar.render
'
)
const
{
multiselectedFiles
,
classes
}
=
this
.
props
const
{
multiselectedFiles
,
classes
}
=
this
.
props
return
(
const
{
loading
}
=
this
.
state
<
ResizeObserver
onResize
=
{
this
.
onResize
}
>
return
([
<
ResizeObserver
key
=
'resize-observer'
onResize
=
{
this
.
onResize
}
>
<
div
className
=
{
classes
.
buttons
}
>
<
div
className
=
{
classes
.
buttons
}
>
{
multiselectedFiles
&&
multiselectedFiles
.
size
>
0
{
multiselectedFiles
&&
multiselectedFiles
.
size
>
0
?
this
.
renderSelectionContextToolbar
()
?
this
.
renderSelectionContextToolbar
()
:
this
.
renderNoSelectionContextToolbar
()
}
:
this
.
renderNoSelectionContextToolbar
()
}
</
div
>
</
div
>
</
ResizeObserver
>
</
ResizeObserver
>,
)
<
LoadingDialog
key
=
'loaging-dialog'
loading
=
{
loading
}
/>
])
}
}
}
}
...
...
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