From 734f077861ae5d735a3cc1d20d69c90fbd346c71 Mon Sep 17 00:00:00 2001 From: Marcelo Rydel Date: Thu, 21 Oct 2021 09:23:08 -0300 Subject: [PATCH] fix(environments): Endpoint deletion modal missing [EE-1887] (#5904) --- app/portainer/views/endpoints/endpointsController.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/portainer/views/endpoints/endpointsController.js b/app/portainer/views/endpoints/endpointsController.js index efbe35675..0cf881ac7 100644 --- a/app/portainer/views/endpoints/endpointsController.js +++ b/app/portainer/views/endpoints/endpointsController.js @@ -3,11 +3,16 @@ import EndpointHelper from 'Portainer/helpers/endpointHelper'; angular.module('portainer.app').controller('EndpointsController', EndpointsController); -function EndpointsController($q, $scope, $state, $async, EndpointService, GroupService, Notifications) { +function EndpointsController($q, $scope, $state, $async, EndpointService, GroupService, ModalService, Notifications) { $scope.removeAction = removeAction; function removeAction(endpoints) { - return $async(removeActionAsync, endpoints); + ModalService.confirmDeletion('This action will remove all configurations associated to your environment(s). Continue?', (confirmed) => { + if (!confirmed) { + return; + } + return $async(removeActionAsync, endpoints); + }); } async function removeActionAsync(endpoints) {