Merge pull request #1898 from coreos-inc/build-logs-scope-apply

Add missing $scope.$apply in the build logs view
This commit is contained in:
josephschorr 2016-09-29 22:44:42 +02:00 committed by GitHub
commit c4ad513834

View file

@ -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;