mirror of
https://github.com/portainer/portainer.git
synced 2025-07-25 08:19:40 +02:00
refactor(ui/modals): replace bootbox with react solution [EE-4541] (#8010)
This commit is contained in:
parent
392c7f74b8
commit
e66dea44e3
111 changed files with 1330 additions and 1562 deletions
|
@ -2,8 +2,11 @@ import _ from 'lodash-es';
|
|||
|
||||
import { PorImageRegistryModel } from 'Docker/models/porImageRegistry';
|
||||
|
||||
import { confirmDestructive } from '@@/modals/confirm';
|
||||
import * as envVarsUtils from '@/portainer/helpers/env-vars';
|
||||
import { FeatureId } from '@/react/portainer/feature-flags/enums';
|
||||
import { buildConfirmButton } from '@@/modals/utils';
|
||||
|
||||
import { ContainerCapabilities, ContainerCapability } from '../../../models/containerCapabilities';
|
||||
import { AccessControlFormData } from '../../../../portainer/components/accessControlForm/porAccessControlFormModel';
|
||||
import { ContainerDetailsViewModel } from '../../../models/container';
|
||||
|
@ -30,7 +33,6 @@ angular.module('portainer.docker').controller('CreateContainerController', [
|
|||
'ContainerService',
|
||||
'ImageService',
|
||||
'FormValidator',
|
||||
'ModalService',
|
||||
'RegistryService',
|
||||
'SystemService',
|
||||
'PluginService',
|
||||
|
@ -56,7 +58,6 @@ angular.module('portainer.docker').controller('CreateContainerController', [
|
|||
ContainerService,
|
||||
ImageService,
|
||||
FormValidator,
|
||||
ModalService,
|
||||
RegistryService,
|
||||
SystemService,
|
||||
PluginService,
|
||||
|
@ -1000,18 +1001,12 @@ angular.module('portainer.docker').controller('CreateContainerController', [
|
|||
function showConfirmationModal() {
|
||||
var deferred = $q.defer();
|
||||
|
||||
ModalService.confirmDestructive({
|
||||
title: 'Are you sure ?',
|
||||
confirmDestructive({
|
||||
title: 'Are you sure?',
|
||||
message: 'A container with the same name already exists. Portainer can automatically remove it and re-create one. Do you want to replace it?',
|
||||
buttons: {
|
||||
confirm: {
|
||||
label: 'Replace',
|
||||
className: 'btn-danger',
|
||||
},
|
||||
},
|
||||
callback: function onConfirm(confirmed) {
|
||||
deferred.resolve(confirmed);
|
||||
},
|
||||
confirmButton: buildConfirmButton('Replace', 'danger'),
|
||||
}).then(function onConfirm(confirmed) {
|
||||
deferred.resolve(confirmed);
|
||||
});
|
||||
|
||||
return deferred.promise;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue