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

refactor(ui/modals): replace bootbox with react solution [EE-4541] (#8010)

This commit is contained in:
Chaim Lev-Ari 2023-02-14 13:49:41 +05:30 committed by GitHub
parent 392c7f74b8
commit e66dea44e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
111 changed files with 1330 additions and 1562 deletions

View file

@ -8,6 +8,8 @@ import { FeatureId } from '@/react/portainer/feature-flags/enums';
import { getIngressControllerClassMap, updateIngressControllerClassMap } from '@/react/kubernetes/cluster/ingressClass/utils';
import { getIsRBACEnabled } from '@/react/kubernetes/cluster/service';
import { buildConfirmButton } from '@@/modals/utils';
import { confirm } from '@@/modals/confirm';
class KubernetesConfigureController {
/* #region CONSTRUCTOR */
@ -21,7 +23,6 @@ class KubernetesConfigureController {
KubernetesStorageService,
EndpointService,
EndpointProvider,
ModalService,
KubernetesResourcePoolService,
KubernetesIngressService,
KubernetesMetricsService
@ -33,7 +34,6 @@ class KubernetesConfigureController {
this.KubernetesStorageService = KubernetesStorageService;
this.EndpointService = EndpointService;
this.EndpointProvider = EndpointProvider;
this.ModalService = ModalService;
this.KubernetesResourcePoolService = KubernetesResourcePoolService;
this.KubernetesIngressService = KubernetesIngressService;
this.KubernetesMetricsService = KubernetesMetricsService;
@ -386,15 +386,10 @@ class KubernetesConfigureController {
uiCanExit() {
if (!this.state.isSaving && (this.areControllersChanged() || this.areFormValuesChanged() || this.areStorageClassesChanged()) && !this.isIngressControllersLoading) {
return this.ModalService.confirmAsync({
return confirm({
title: 'Are you sure?',
message: 'You currently have unsaved changes in the cluster setup view. Are you sure you want to leave?',
buttons: {
confirm: {
label: 'Yes',
className: 'btn-danger',
},
},
confirmButton: buildConfirmButton('Yes', 'danger'),
});
}
}