The 'CANCEL' button in the precomputed form is misleading, as we could think it allows to cancel the job, while it really only allows to cancel the edition of the precomputed settings
Clicking the cancel button from the progress bar for a precomputed job while in the ON_HOLD state does not seem to do anything
Starting a precomputed job multiple times may raise errors when the results of the computation arrive late
Deleting a precomputed job sometimes throws an error: MongoServerError: ns not found
A progress bar is still visible after we have deleted a precomputed job in the ON_HOLD state
Solutions
Rename the 'CANCEL' button to 'BACK' to make it clearer what it does
Do not display the cancel button in the progress bar for precomputed jobs: indeed, such jobs must be DELETED to cancel them
Fix errors when Deleting a precomputed job
Properly remove the progress bar when a precomputed job is deleted, regardless of its state
Detect when we receive the computation results from the webservice for a precomputed job that was deleted, and simply do nothing in this case
Testing
This PR includes a commit that was reverted, which contains some code allowing to test the different status of a precomputed job.
To use it, re-apply the changes from that commit, then run make start-dev again.
This fake service is set up to answer to the precomputed job after 20 seconds, and then call the success callback after 20 more seconds. Timers can be configured in the server-json.js file.
Problems
MongoServerError: ns not found
Solutions
Testing
This PR includes a commit that was reverted, which contains some code allowing to test the different status of a precomputed job.
To use it, re-apply the changes from that commit, then run
make start-dev
again.Once it's done, you will be able to create a precomputed job with the following URL: http://json-server:3001/webhook
This fake service is set up to answer to the precomputed job after 20 seconds, and then call the success callback after 20 more seconds. Timers can be configured in the
server-json.js
file.