Skip to content

Commit

Permalink
Fix submission detail page hangs when deletion fails
Browse files Browse the repository at this point in the history
  • Loading branch information
cccs-sgaron committed May 7, 2020
1 parent e154cb3 commit 9d40632
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions assemblyline_ui/static/js/submission_detail.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,23 @@ let app = angular.module('app', ['utils', 'search', 'ngAnimate', 'socket-io', 'u
return;
}

let message = "";
$scope.loading_extra = false;
if (data.api_error_message) {
$scope.error = data.api_error_message;
message = data.api_error_message;
} else {
$scope.error = config.url + " (" + status + ")";
message = config.url + " (" + status + ")";
}
$("div.sweet-alert").find("button").show();
swal({
title: "Deletion failed!",
text: message,
type: "error",
showCancelButton: false,
confirmButtonColor: "#D0D0D0",
confirmButtonText: "Close",
closeOnConfirm: true
});
});
});
};
Expand Down

0 comments on commit 9d40632

Please sign in to comment.