fix(docker):Fix image pulled errorDetails not showing EE-936 (#5336)

* fix image pulled errorDetails not showing

* code clean up for errorDetail detection
pull/5352/head
Richard Wei 3 years ago committed by GitHub
parent 7d6b1edd48
commit 49f25e9c4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -36,7 +36,11 @@ angular.module('portainer.docker').controller('ImagesController', [
$scope.state.actionInProgress = true;
ImageService.pullImage(registryModel, false)
.then(function success() {
.then(function success(data) {
var err = data[data.length - 1].errorDetail;
if (err) {
return Notifications.error('Failure', err, 'Unable to pull image');
}
Notifications.success('Image successfully pulled', registryModel.Image);
$state.reload();
})

Loading…
Cancel
Save