Open ilias-ant opened 2 years ago
Yes, we can maybe make the request to cancel.json and then display the results.
There was a start at a new UI in #304 from before I became maintainer.
There was also some relevant code in #254
Edit: Another idea is to maybe add a hidden input to the form, which, if received, causes the webservice to return a 302 to redirect to the homepage. While that's maybe simpler, the JavaScript solution is preferred, to avoid polluting the API with this sort of frontend logic.
Problem
When someone uses the
Cancel
button(s) available in the/jobs
page:the action redirects you to the
/cancel.json
page (which is the respective web service response), detailing something like the following:If someone wants to perform multiple
Cancel
actions, it has to navigate between the/jobs
page and the individual redirected/cancel.json
pages, which makes it a bit tiresome.Context
scrapyd v1.3.0
Proposal
The
Cancel
action through the/jobs
UI should not redirect, but rather display the response in the same view (/jobs
). Perhaps this cannot be done purely with HTML, and a bit of Javascript may be needed.