From a85605333886143776ead33fb9843147714b8def Mon Sep 17 00:00:00 2001 From: xAt0mZ Date: Mon, 15 Jul 2019 13:28:30 +0200 Subject: [PATCH 1/2] fix(containers): multiple clics on image commit button were creating a lot of images --- app/docker/views/containers/edit/containerController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/docker/views/containers/edit/containerController.js b/app/docker/views/containers/edit/containerController.js index 7a9aff9c9..5e7b5f127 100644 --- a/app/docker/views/containers/edit/containerController.js +++ b/app/docker/views/containers/edit/containerController.js @@ -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'); From f71a565acc177f893ba241df77099ef00d3f90a3 Mon Sep 17 00:00:00 2001 From: xAt0mZ Date: Thu, 18 Jul 2019 17:19:00 +0200 Subject: [PATCH 2/2] refactor(container): reword notification messages --- app/docker/views/containers/edit/containerController.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/docker/views/containers/edit/containerController.js b/app/docker/views/containers/edit/containerController.js index 5e7b5f127..12f7ce7ca 100644 --- a/app/docker/views/containers/edit/containerController.js +++ b/app/docker/views/containers/edit/containerController.js @@ -156,10 +156,10 @@ function ($q, $scope, $state, $transition$, $filter, Commit, ContainerHelper, Co 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); + Notifications.success('Image created', $transition$.params().id); }, function (e) { update(); - Notifications.error('Failure', e, 'Unable to commit container'); + Notifications.error('Failure', e, 'Unable to create image'); }); };