-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
# use endpoint for deleting specific simulation #1762
# use endpoint for deleting specific simulation #1762
Conversation
I haven't tested this myself, but I am curious, which type of simulations can be cancelled this way: submitted to celery ("direct") or submitted to HPC cluster ("batch") ? |
@matuszsmig how that should work in fact ? Is it the small X that should delete the simulation, or something else in the UI ? If I click on X it displays popup "Delete local data" which doesn't make much sense now. |
Clicking |
I separated delete callback to two different callback (cancel and delete) and changed tooltip. |
@grzanka So if simulation is cancelled this "Retry" button should change into delete (x) button? |
Yes, exactly. This retry button if I remember correctly was intended to fetch again status of simulation |
I've deleted See movie below. I click delete around 1:10, simulation card is gone around 1:20 Screencast.from.2024-10-07.18-40-12.webmWas that I had to wait 10 seconds for subsequent call to |
# handle delete simulation also on forntend site # if simulation is cancelled x appears
I have made some refactoring so I added @tudde to reviewers. Also changed that if simulation is state "CANCELLED" it is possible now to delete it. I used kind of trick, when x is being pressed (delete) I am not only calling delete request, but also delete it from REACT's state, is it good aproach? @grzanka |
I havent made any tests yet, so cannot say how does it work now
what if delete request is not successful ? |
@ostatni5 maybe your advice here may help ? |
I don't know what would be if request would fail there should be thrown some error, I may add some prompt asking if you are sure to delete it, it wouldn't change my hack. I think that is common approach |
I've merged related PR on backend, hence this code needs now to be tested with |
When deleting a resource it is a good idea to ask the user for confirmation if this action is irreversible. |
@ostatni5 and what do you think of refactoring, to my looks OK, but you are much more familiar with this code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works well, needs documentation but thats an separate issue.
Here is an issue related to documentation of this feature: yaptide/docs#72 |
@matuszsmig should we make this a regular PR, not a draft ? |
@grzanka i need to add this prompt which asks user if he is sure to delete it and I want to test one thing |
ok, no review from @tudde , merging |
* # use endpoint for deleting specific simulation * changes aftert code review * # small refator # handle delete simulation also on forntend site # if simulation is cancelled x appears
Related PR on backend yaptide/yaptide#1077