Skip to content
GitLab
Menu
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
e87ecfdb
Commit
e87ecfdb
authored
Mar 17, 2022
by
Markus Scheidgen
Browse files
Fixed wrong handling of upload deletes in the UI.
parent
26ef1063
Changes
1
Hide whitespace changes
Inline
Side-by-side
gui/src/components/uploads/UploadPage.js
View file @
e87ecfdb
...
...
@@ -355,6 +355,7 @@ function UploadPage() {
})
.
catch
((
error
)
=>
{
if
(
error
instanceof
DoesNotExist
&&
deleteClicked
)
{
history
.
push
(
getUrl
(
'
uploads
'
,
location
))
return
}
if
(
!
hasUpload
&&
error
.
apiMessage
)
{
...
...
@@ -363,17 +364,15 @@ function UploadPage() {
raiseError
(
error
)
}
})
},
[
api
,
hasUpload
,
uploadId
,
pagination
,
deleteClicked
,
raiseError
,
setData
,
setApiData
])
},
[
api
,
hasUpload
,
uploadId
,
pagination
,
deleteClicked
,
raiseError
,
setData
,
setApiData
,
location
,
history
])
// constant fetching of upload data when necessary
useEffect
(()
=>
{
if
(
isProcessing
)
{
const
interval
=
setInterval
(
fetchData
(),
1000
)
return
()
=>
clearInterval
(
interval
)
}
else
if
(
deleteClicked
)
{
history
.
push
(
getUrl
(
'
uploads
'
,
location
))
}
},
[
fetchData
,
isProcessing
,
deleteClicked
,
history
,
location
])
},
[
fetchData
,
isProcessing
])
// initial fetching of upload data
useEffect
(
fetchData
(),
[
fetchData
])
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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