Add missing $scope.$apply in the build logs view
Without this, the logs appear to never load, until such time as any other digest cycle comes along Fixes #1886
This commit is contained in:
parent
9def2cf055
commit
3476829139
1 changed files with 12 additions and 8 deletions
|
@ -117,15 +117,19 @@ angular.module('quay').directive('buildLogsView', function () {
|
|||
$.ajax({
|
||||
url: logsUrl,
|
||||
}).done(function(r) {
|
||||
handleLogsData(r, callback);
|
||||
$scope.$apply(function() {
|
||||
handleLogsData(r, callback);
|
||||
});
|
||||
}).error(function(xhr) {
|
||||
if (xhr.status == 0) {
|
||||
UtilService.isAdBlockEnabled(function(result) {
|
||||
$scope.loadError = result ? 'blocked': 'request-failed';
|
||||
});
|
||||
} else {
|
||||
$scope.loadError = 'request-failed';
|
||||
}
|
||||
$scope.$apply(function() {
|
||||
if (xhr.status == 0) {
|
||||
UtilService.isAdBlockEnabled(function(result) {
|
||||
$scope.loadError = result ? 'blocked': 'request-failed';
|
||||
});
|
||||
} else {
|
||||
$scope.loadError = 'request-failed';
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return;
|
||||
|
|
Reference in a new issue