mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 07:19:41 +02:00
refactor(namespace): migrate namespace edit to react [r8s-125] (#38)
This commit is contained in:
parent
40c7742e46
commit
ce7e0d8d60
108 changed files with 3183 additions and 2194 deletions
|
@ -2,14 +2,16 @@ import { ModalType } from '@@/modals';
|
|||
import { confirm } from '@@/modals/confirm';
|
||||
import { buildConfirmButton } from '@@/modals/utils';
|
||||
|
||||
export function confirmUpdateNamespace(
|
||||
quotaWarning: boolean,
|
||||
ingressWarning: boolean,
|
||||
registriesWarning: boolean
|
||||
) {
|
||||
type Warnings = {
|
||||
quota: boolean;
|
||||
ingress: boolean;
|
||||
registries: boolean;
|
||||
};
|
||||
|
||||
export function confirmUpdateNamespace(warnings: Warnings) {
|
||||
const message = (
|
||||
<>
|
||||
{quotaWarning && (
|
||||
{warnings.quota && (
|
||||
<p>
|
||||
Reducing the quota assigned to an "in-use" namespace may
|
||||
have unintended consequences, including preventing running
|
||||
|
@ -17,13 +19,13 @@ export function confirmUpdateNamespace(
|
|||
them from running at all.
|
||||
</p>
|
||||
)}
|
||||
{ingressWarning && (
|
||||
{warnings.ingress && (
|
||||
<p>
|
||||
Deactivating ingresses may cause applications to be unaccessible. All
|
||||
ingress configurations from affected applications will be removed.
|
||||
</p>
|
||||
)}
|
||||
{registriesWarning && (
|
||||
{warnings.registries && (
|
||||
<p>
|
||||
Some registries you removed might be used by one or more applications
|
||||
inside this environment. Removing the registries access could lead to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue