fix(container-creation): do not stop container creation if unable to pull image

pull/380/head^2
Anthony Lapenna 2016-12-15 14:30:35 +13:00 committed by GitHub
parent 2a28921984
commit 1e5207517d
1 changed files with 1 additions and 8 deletions

View File

@ -129,14 +129,7 @@ function ($scope, $state, $stateParams, $filter, Config, Info, Container, Contai
// TODO: centralize, already present in templatesController
function pullImageAndCreateContainer(config) {
Image.create($scope.imageConfig, function (data) {
var err = data.length > 0 && data[data.length - 1].hasOwnProperty('error');
if (err) {
var detail = data[data.length - 1];
$('#createContainerSpinner').hide();
Messages.error('Error', {}, detail.error);
} else {
createContainer(config);
}
createContainer(config);
}, function (e) {
$('#createContainerSpinner').hide();
Messages.error('Failure', e, 'Unable to pull image');