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

pull/5967/head
Marcelo Rydel 3 years ago committed by GitHub
parent b5ec8c52fb
commit 734f077861
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save