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:
parent
e37e87971d
commit
f96e7ff434
5 changed files with 69 additions and 17 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue