1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 07:49:41 +02:00

fix(ui): confirm deletion [EE-4612] (#8868)

This commit is contained in:
Chaim Lev-Ari 2023-05-21 17:16:15 +07:00 committed by GitHub
parent e37e87971d
commit f96e7ff434
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 69 additions and 17 deletions

View file

@ -1,4 +1,6 @@
import _ from 'lodash-es';
import { confirmDestructive } from '@@/modals/confirm';
import { buildConfirmButton } from '@@/modals/utils';
export class EdgeStacksViewController {
/* @ngInject */
@ -25,6 +27,16 @@ export class EdgeStacksViewController {
}
async removeActionAsync(stacks) {
const confirmed = await confirmDestructive({
title: 'Are you sure?',
message: 'Are you sure you want to remove the selected Edge stack(s)?',
confirmButton: buildConfirmButton('Remove', 'danger'),
});
if (!confirmed) {
return;
}
for (let stack of stacks) {
try {
await this.EdgeStackService.remove(stack.Id);