Revert "feat(frontend): import CE code to EE" (#1557)

This commit is contained in:
Chaim Lev-Ari
2025-12-18 13:45:26 +02:00
committed by GitHub
parent 2f5b083c5c
commit bf8ccbcec6
1849 changed files with 6494 additions and 6602 deletions
@@ -1,10 +1,10 @@
import { render, screen, waitFor } from '@testing-library/react';
import { http, HttpResponse } from 'msw';
import { server } from '@CE/setup-tests/server';
import { withTestQueryProvider } from '@CE/react/test-utils/withTestQuery';
import { Environment } from '@CE/react/portainer/environments/types';
import { EnvironmentGroup } from '@CE/react/portainer/environments/environment-groups/types';
import { server } from '@/setup-tests/server';
import { withTestQueryProvider } from '@/react/test-utils/withTestQuery';
import { Environment } from '@/react/portainer/environments/types';
import { EnvironmentGroup } from '@/react/portainer/environments/environment-groups/types';
import { EnvSelector, getEnvironmentOptions } from './EnvSelector';
@@ -1,15 +1,15 @@
import { useMemo } from 'react';
import { useEnvironmentList } from '@CE/react/portainer/environments/queries';
import { useGroups } from '@CE/react/portainer/environments/environment-groups/queries';
import { Environment } from '@CE/react/portainer/environments/types';
import { EnvironmentGroup } from '@CE/react/portainer/environments/environment-groups/types';
import { useEnvironmentList } from '@/react/portainer/environments/queries';
import { useGroups } from '@/react/portainer/environments/environment-groups/queries';
import { Environment } from '@/react/portainer/environments/types';
import { EnvironmentGroup } from '@/react/portainer/environments/environment-groups/types';
import {
PortainerSelect,
GroupOption,
} from '@@CE/form-components/PortainerSelect';
import { FormError } from '@@CE/form-components/FormError';
} from '@@/form-components/PortainerSelect';
import { FormError } from '@@/form-components/FormError';
export function EnvSelector({
value,
@@ -2,12 +2,12 @@ import { render, waitFor } from '@testing-library/react';
import { http, HttpResponse } from 'msw';
import { UIRouterContext, UIRouterReact } from '@uirouter/react';
import { server } from '@CE/setup-tests/server';
import { withTestQueryProvider } from '@CE/react/test-utils/withTestQuery';
import { Environment } from '@CE/react/portainer/environments/types';
import { EnvironmentGroup } from '@CE/react/portainer/environments/environment-groups/types';
import { Stack } from '@CE/react/common/stacks/types';
import { createMockStack } from '@CE/react-tools/test-mocks';
import { server } from '@/setup-tests/server';
import { withTestQueryProvider } from '@/react/test-utils/withTestQuery';
import { Environment } from '@/react/portainer/environments/types';
import { EnvironmentGroup } from '@/react/portainer/environments/environment-groups/types';
import { Stack } from '@/react/common/stacks/types';
import { createMockStack } from '@/react-tools/test-mocks';
import { StackDuplicationForm } from './StackDuplicationForm';
@@ -2,19 +2,16 @@ import { Formik } from 'formik';
import { Copy } from 'lucide-react';
import { useRouter } from '@uirouter/react';
import {
notifyError,
notifySuccess,
} from '@CE/portainer/services/notifications';
import { Stack } from '@CE/react/common/stacks/types';
import { notifyError, notifySuccess } from '@/portainer/services/notifications';
import { Stack } from '@/react/common/stacks/types';
import { Widget } from '@@CE/Widget';
import { WidgetBody } from '@@CE/Widget/WidgetBody';
import { WidgetTitle } from '@@CE/Widget/WidgetTitle';
import { validateForm } from '@@CE/form-components/validate-form';
import { confirm } from '@@CE/modals/confirm';
import { ModalType } from '@@CE/modals';
import { buildConfirmButton } from '@@CE/modals/utils';
import { Widget } from '@@/Widget';
import { WidgetBody } from '@@/Widget/WidgetBody';
import { WidgetTitle } from '@@/Widget/WidgetTitle';
import { validateForm } from '@@/form-components/validate-form';
import { confirm } from '@@/modals/confirm';
import { ModalType } from '@@/modals';
import { buildConfirmButton } from '@@/modals/utils';
import { FormSubmitValues } from './StackDuplicationForm.types';
import { StackDuplicationFormInner } from './StackDuplicationFormInner';
@@ -1,9 +1,9 @@
import { object, string, number } from 'yup';
import { useEffect, useState } from 'react';
import { STACK_NAME_VALIDATION_REGEX } from '@CE/react/constants';
import { STACK_NAME_VALIDATION_REGEX } from '@/react/constants';
import { validateForm } from '@@CE/form-components/validate-form';
import { validateForm } from '@@/form-components/validate-form';
import { FormSubmitValues } from './StackDuplicationForm.types';
@@ -3,10 +3,10 @@ import userEvent from '@testing-library/user-event';
import { Formik } from 'formik';
import { http, HttpResponse } from 'msw';
import { server } from '@CE/setup-tests/server';
import { withTestQueryProvider } from '@CE/react/test-utils/withTestQuery';
import { Environment } from '@CE/react/portainer/environments/types';
import { EnvironmentGroup } from '@CE/react/portainer/environments/environment-groups/types';
import { server } from '@/setup-tests/server';
import { withTestQueryProvider } from '@/react/test-utils/withTestQuery';
import { Environment } from '@/react/portainer/environments/types';
import { EnvironmentGroup } from '@/react/portainer/environments/environment-groups/types';
import { StackDuplicationFormInner } from './StackDuplicationFormInner';
import { FormSubmitValues } from './StackDuplicationForm.types';
@@ -2,12 +2,12 @@ import { useState } from 'react';
import { Field, Form, useFormikContext } from 'formik';
import { Copy, ArrowRight } from 'lucide-react';
import { EnvironmentId } from '@CE/react/portainer/environments/types';
import { EnvironmentId } from '@/react/portainer/environments/types';
import { LoadingButton } from '@@CE/buttons/LoadingButton';
import { Input } from '@@CE/form-components/Input';
import { FormError } from '@@CE/form-components/FormError';
import { TextTip } from '@@CE/Tip/TextTip';
import { LoadingButton } from '@@/buttons/LoadingButton';
import { Input } from '@@/form-components/Input';
import { FormError } from '@@/form-components/FormError';
import { TextTip } from '@@/Tip/TextTip';
import { FormSubmitValues, ActionType } from './StackDuplicationForm.types';
import { useValidation } from './StackDuplicationForm.validation';
@@ -1,6 +1,6 @@
import { http, HttpResponse } from 'msw';
import { server } from '@CE/setup-tests/server';
import { server } from '@/setup-tests/server';
import { StackType } from '../../../../../common/stacks/types';
@@ -1,8 +1,8 @@
import { useMutation } from '@tanstack/react-query';
import { getSwarm } from '@CE/react/docker/proxy/queries/useSwarm';
import { Pair } from '@CE/react/portainer/settings/types';
import { EnvironmentId } from '@CE/react/portainer/environments/types';
import { getSwarm } from '@/react/docker/proxy/queries/useSwarm';
import { Pair } from '@/react/portainer/settings/types';
import { EnvironmentId } from '@/react/portainer/environments/types';
import { createStandaloneStackFromFileContent } from '../../../../../common/stacks/queries/useCreateStack/createStandaloneStackFromFileContent';
import { createSwarmStackFromFileContent } from '../../../../../common/stacks/queries/useCreateStack/createSwarmStackFromFileContent';
@@ -1,6 +1,6 @@
import { http, HttpResponse } from 'msw';
import { server } from '@CE/setup-tests/server';
import { server } from '@/setup-tests/server';
import { StackType } from '../../../../../common/stacks/types';
@@ -1,8 +1,8 @@
import { useMutation } from '@tanstack/react-query';
import { getSwarm } from '@CE/react/docker/proxy/queries/useSwarm';
import { EnvironmentId } from '@CE/react/portainer/environments/types';
import axios, { parseAxiosError } from '@CE/portainer/services/axios';
import { getSwarm } from '@/react/docker/proxy/queries/useSwarm';
import { EnvironmentId } from '@/react/portainer/environments/types';
import axios, { parseAxiosError } from '@/portainer/services/axios';
import { StackType } from '../../../../../common/stacks/types';
import { buildStackUrl } from '../../../../../common/stacks/queries/buildUrl';