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:
parent
6fde4195f8
commit
cfe0d3092d
4 changed files with 43 additions and 24 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue