Commit 5f73bbc6 authored by Stan Hu's avatar Stan Hu

Stop import spinner when import failed

parent 83770573
......@@ -45,6 +45,8 @@ class ImporterStatus {
}
$btn.disable().addClass('is-loading');
this.id = id;
return axios.post(this.importUrl, {
repo_id: id,
target_namespace: targetNamespace,
......@@ -70,6 +72,10 @@ class ImporterStatus {
.catch((error) => {
let details = error;
const jobItem = $(`#repo_${this.id}`);
const statusField = jobItem.find('.job-status');
statusField.html(__('Failed'));
if (error.response && error.response.data && error.response.data.errors) {
details = error.response.data.errors;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment