fix(containers): multiple clics on image commit button were creating a lot of images

pull/3013/head
xAt0mZ 2019-07-15 13:28:30 +02:00
parent 693182fbd3
commit a856053338
1 changed files with 1 additions and 1 deletions

View File

@ -151,12 +151,12 @@ function ($q, $scope, $state, $transition$, $filter, Commit, ContainerHelper, Co
$scope.commit = function () {
var image = $scope.config.Image;
$scope.config.Image = '';
var registry = $scope.config.Registry;
var imageConfig = ImageHelper.createImageConfigForCommit(image, registry.URL);
Commit.commitContainer({id: $transition$.params().id, tag: imageConfig.tag, repo: imageConfig.repo}, function () {
update();
Notifications.success('Container commited', $transition$.params().id);
$scope.config.Image = '';
}, function (e) {
update();
Notifications.error('Failure', e, 'Unable to commit container');