Import status spinner doesn't stop spinning if error occurs

A follow up to https://gitlab.com/gitlab-org/gitlab-ce/issues/47365, if an import fails, the spinner continues to spin. It looks like we don't do anything with statusField if we hit https://gitlab.com/gitlab-org/gitlab-ce/blob/414af1213e4be015706cc0702e571bd48c68cd3a/app/assets/javascripts/importer_status.js#L70.

Steps to reproduce:

  1. Import a project from GitHub/Bitbucket/etc.

  2. In the Rails console, do something like:

    project = Project.last
    project.import_type = nil
    project.save
  3. Retry the import.

Assignee Loading
Time tracking Loading