-
Notifications
You must be signed in to change notification settings - Fork 27
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
Disallow saving a non-opened project #2225
Disallow saving a non-opened project #2225
Conversation
This reverts commit 78bdea4.
Codecov Report
@@ Coverage Diff @@
## master #2225 +/- ##
========================================
- Coverage 73.0% 72.9% -0.1%
========================================
Files 465 465
Lines 17983 17983
Branches 1773 1773
========================================
- Hits 13133 13124 -9
- Misses 4381 4387 +6
- Partials 469 472 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Cool. Maybe a short message telling the user he was disconnected for too long might come in nicely?
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.
Shouldn't we add a condition on the backend API such that a study can only be modified if it is first active (i.e. opened) ?
The problem is that at the moment the frontend can't patch a specific field in the study, so every modification in the study itself goes through the put call providing the whole serialized study in the body, not only the workbench changes.... (that's why the very first solution from Friday was discarded). |
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.
I see, we'll have to provide a better solution for the future.
What do these changes do?
When a user forgets a project opened in a laptop, or takes a plane. the project gets disconnected after 15 minutes.
In case he reconnects, the project would save again without being opened in the backend. This cannot be tolerated.
Solution:
when the connect/reconnect event happens in the webscoket, the frontend asks for the active study. If the backend already closed the study, it will return a null. In that case the frontend brings the user back to the dashboard.
Related issue/s
related to ITISFoundation/osparc-issues#435
How to test
Checklist