mirror of https://github.com/portainer/portainer
feat(kube): Add a confirmation modal before deleting one or more application or configuration (#4522)
parent
20cf948e53
commit
60c5ab3eec
|
@ -79,7 +79,11 @@ class KubernetesApplicationsController {
|
||||||
}
|
}
|
||||||
|
|
||||||
removeAction(selectedItems) {
|
removeAction(selectedItems) {
|
||||||
return this.$async(this.removeActionAsync, selectedItems);
|
this.ModalService.confirmDeletion('Do you want to remove the selected application(s)?', (confirmed) => {
|
||||||
|
if (confirmed) {
|
||||||
|
return this.$async(this.removeActionAsync, selectedItems);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onPublishingModeClick(application) {
|
onPublishingModeClick(application) {
|
||||||
|
|
|
@ -3,12 +3,13 @@ import KubernetesConfigurationHelper from 'Kubernetes/helpers/configurationHelpe
|
||||||
|
|
||||||
class KubernetesConfigurationsController {
|
class KubernetesConfigurationsController {
|
||||||
/* @ngInject */
|
/* @ngInject */
|
||||||
constructor($async, $state, Notifications, KubernetesConfigurationService, KubernetesApplicationService) {
|
constructor($async, $state, Notifications, KubernetesConfigurationService, KubernetesApplicationService, ModalService) {
|
||||||
this.$async = $async;
|
this.$async = $async;
|
||||||
this.$state = $state;
|
this.$state = $state;
|
||||||
this.Notifications = Notifications;
|
this.Notifications = Notifications;
|
||||||
this.KubernetesConfigurationService = KubernetesConfigurationService;
|
this.KubernetesConfigurationService = KubernetesConfigurationService;
|
||||||
this.KubernetesApplicationService = KubernetesApplicationService;
|
this.KubernetesApplicationService = KubernetesApplicationService;
|
||||||
|
this.ModalService = ModalService;
|
||||||
|
|
||||||
this.onInit = this.onInit.bind(this);
|
this.onInit = this.onInit.bind(this);
|
||||||
this.getConfigurations = this.getConfigurations.bind(this);
|
this.getConfigurations = this.getConfigurations.bind(this);
|
||||||
|
@ -56,7 +57,11 @@ class KubernetesConfigurationsController {
|
||||||
}
|
}
|
||||||
|
|
||||||
removeAction(selectedItems) {
|
removeAction(selectedItems) {
|
||||||
return this.$async(this.removeActionAsync, selectedItems);
|
this.ModalService.confirmDeletion('Do you want to remove the selected configuration(s)?', (confirmed) => {
|
||||||
|
if (confirmed) {
|
||||||
|
return this.$async(this.removeActionAsync, selectedItems);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async getApplicationsAsync() {
|
async getApplicationsAsync() {
|
||||||
|
|
Loading…
Reference in New Issue