Skip to content

Improve UI submit error handling #228

@cert-ee-raidar

Description

@cert-ee-raidar

Problem

Submit view ( /submit ) has missing/incomplete/non uniform error handling for cases when no file or url is added.

File:

  • Currently no error handling present if no file is selected and Configure analysis button is pressed.
  • Configure analysis button is blue and active but does nothing when file is not seleted.

URL:

  • When no URL is entered into input box, and Configure analysis button is pressed, browser displays error page with status code 400. That is not consistent with the rest of error handling on submit view like ['Cannot validate this URL: htteps://some.malformed.url'] popup for invalid URL.

General errors:

  • In case of error, user is redirected to submit/index.html.jinja2 template.
    • Errors must be displayed on the tab where the error occurs.

Scope

Web UI - submit/

Solution

File submit:

  • Configure analysis button is disabled when no file is selected.
  • Configure analysis button is enabled when file is selected.

URL submit:

  • URL tab Configure analysis button is enabled
  • URL input type is url and pattern= matches correct http:// or https:// url pattern for atleast top level domain.
  • Complete URL validation remains inside Django for now

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementExisting functionality that needs improvements

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions