1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-28 17:59:45 +02:00

feat(ui): add confirmation to delete actions [EE-4612] (#10003)

This commit is contained in:
Chaim Lev-Ari 2023-08-19 19:19:02 +03:00 committed by GitHub
parent 6fde4195f8
commit cfe0d3092d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 43 additions and 24 deletions

View file

@ -1,4 +1,5 @@
import _ from 'lodash-es';
import { confirmDelete } from '@@/modals/confirm';
export class EdgeGroupsController {
/* @ngInject */
@ -26,6 +27,10 @@ export class EdgeGroupsController {
}
async removeActionAsync(selectedItems) {
if (!(await confirmDelete('Do you want to remove the selected Edge Group(s)?'))) {
return;
}
for (let item of selectedItems) {
try {
await this.EdgeGroupService.remove(item.Id);