Skip to content

Change Cancel button to call cancel.json via JavaScript, to avoid page navigation #436

@ilias-ant

Description

@ilias-ant

Problem

When someone uses the Cancel button(s) available in the /jobs page:

image

the action redirects you to the /cancel.json page (which is the respective web service response), detailing something like the following:

{"node_name": "foobar", "status": "ok", "prevstate": "pending"}

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions