1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-05 05:45:22 +02:00

fix(environments): Endpoint deletion modal missing [EE-1887] (#5904)

This commit is contained in:
Marcelo Rydel 2021-10-21 09:23:08 -03:00 committed by GitHub
parent b5ec8c52fb
commit 734f077861
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {