Fixed bug where user could not delete a container that failed to start

This commit is contained in:
Jeffrey Morgan 2015-10-18 15:57:03 -07:00
Родитель 2f38e3f188
Коммит dbe1f46d4b
1 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -101,7 +101,6 @@ export default {
containerData.Env = containerData.Config.Env;
}
containerData.Volumes = _.mapObject(containerData.Volumes, () => {return {};});
let existing = this.client.getContainer(name);
@ -114,6 +113,8 @@ export default {
}
metrics.track('Container Finished Creating');
this.startContainer(name, containerData);
delete this.placeholders[name];
localStorage.setItem('placeholders', JSON.stringify(this.placeholders));
});
});
});
@ -164,7 +165,7 @@ export default {
Name: name,
Image: imageName,
Config: {
Image: imageName,
Image: imageName
},
Tty: true,
OpenStdin: true,
@ -187,8 +188,6 @@ export default {
return;
}
delete this.placeholders[name];
localStorage.setItem('placeholders', JSON.stringify(this.placeholders));
this.createContainer(name, {Image: imageName, Tty: true, OpenStdin: true});
},