Stop import spinner when import failed
This commit is contained in:
parent
8377057364
commit
5f73bbc614
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue