mirror of
https://github.com/portainer/portainer.git
synced 2025-08-05 05:45:22 +02:00
refactor(portainer): move to react [EE-3350] (#7915)
This commit is contained in:
parent
30e23ea5b4
commit
78dcba614d
192 changed files with 200 additions and 211 deletions
|
@ -1,4 +1,4 @@
|
|||
import { UserContext } from '@/portainer/hooks/useUser';
|
||||
import { UserContext } from '@/react/hooks/useUser';
|
||||
import { UserViewModel } from '@/portainer/models/user';
|
||||
import { render, within } from '@/react-tools/test-utils';
|
||||
|
||||
|
|
|
@ -16,11 +16,7 @@ import {
|
|||
type EnvironmentId,
|
||||
EnvironmentStatus,
|
||||
} from '@/react/portainer/environments/types';
|
||||
import {
|
||||
Authorized,
|
||||
useUser,
|
||||
isEnvironmentAdmin,
|
||||
} from '@/portainer/hooks/useUser';
|
||||
import { Authorized, useUser, isEnvironmentAdmin } from '@/react/hooks/useUser';
|
||||
import { useInfo, useVersion } from '@/docker/services/system.service';
|
||||
|
||||
import { SidebarItem } from './SidebarItem';
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
} from '@/react/portainer/environments/types';
|
||||
import { getPlatformType } from '@/react/portainer/environments/utils';
|
||||
import { useEnvironment } from '@/react/portainer/environments/queries/useEnvironment';
|
||||
import { useLocalStorage } from '@/portainer/hooks/useLocalStorage';
|
||||
import { useLocalStorage } from '@/react/hooks/useLocalStorage';
|
||||
import { EndpointProviderInterface } from '@/portainer/services/endpointProvider';
|
||||
|
||||
import { getPlatformIcon } from '../portainer/environments/utils/get-platform-icon';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { PropsWithChildren } from 'react';
|
||||
import clsx from 'clsx';
|
||||
|
||||
import { isBE } from '@/portainer/feature-flags/feature-flags.service';
|
||||
import { isBE } from '@/react/portainer/feature-flags/feature-flags.service';
|
||||
|
||||
import { UpdateNotification } from './UpdateNotifications';
|
||||
import { BuildInfoModalButton } from './BuildInfoModal';
|
||||
|
|
|
@ -2,7 +2,7 @@ import { useQuery } from 'react-query';
|
|||
import clsx from 'clsx';
|
||||
|
||||
import { getVersionStatus } from '@/portainer/services/api/status.service';
|
||||
import { useUIState } from '@/portainer/hooks/useUIState';
|
||||
import { useUIState } from '@/react/hooks/useUIState';
|
||||
|
||||
import { Icon } from '@@/Icon';
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { ChevronsLeft, ChevronsRight } from 'react-feather';
|
||||
import clsx from 'clsx';
|
||||
|
||||
import { isBE } from '@/portainer/feature-flags/feature-flags.service';
|
||||
import { isBE } from '@/react/portainer/feature-flags/feature-flags.service';
|
||||
import smallLogo from '@/assets/ico/logomark.svg';
|
||||
|
||||
import { Link } from '@@/Link';
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
} from '@/portainer/services/terminal-window';
|
||||
import { EnvironmentId } from '@/react/portainer/environments/types';
|
||||
import { error as notifyError } from '@/portainer/services/notifications';
|
||||
import { useLocalStorage } from '@/portainer/hooks/useLocalStorage';
|
||||
import { useLocalStorage } from '@/react/hooks/useLocalStorage';
|
||||
|
||||
import { Icon } from '@@/Icon';
|
||||
import { Button } from '@@/buttons';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Box, Edit, Layers, Lock, Server } from 'react-feather';
|
||||
|
||||
import { EnvironmentId } from '@/react/portainer/environments/types';
|
||||
import { Authorized } from '@/portainer/hooks/useUser';
|
||||
import { Authorized } from '@/react/hooks/useUser';
|
||||
import Helm from '@/assets/ico/vendor/helm.svg?c';
|
||||
import Route from '@/assets/ico/route.svg?c';
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import { usePublicSettings } from '@/react/portainer/settings/queries';
|
|||
import {
|
||||
FeatureFlag,
|
||||
useFeatureFlag,
|
||||
} from '@/portainer/feature-flags/useRedirectFeatureFlag';
|
||||
} from '@/react/portainer/feature-flags/useRedirectFeatureFlag';
|
||||
|
||||
import { SidebarItem } from './SidebarItem';
|
||||
import { SidebarSection } from './SidebarSection';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import clsx from 'clsx';
|
||||
import { Home } from 'react-feather';
|
||||
|
||||
import { useUser } from '@/portainer/hooks/useUser';
|
||||
import { useUser } from '@/react/hooks/useUser';
|
||||
import { useIsTeamLeader } from '@/portainer/users/queries';
|
||||
import { usePublicSettings } from '@/react/portainer/settings/queries';
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import {
|
|||
import angular, { IScope } from 'angular';
|
||||
import _ from 'lodash';
|
||||
|
||||
import * as storage from '@/portainer/hooks/useLocalStorage';
|
||||
import * as storage from '@/react/hooks/useLocalStorage';
|
||||
|
||||
// using bootstrap breakpoint - https://getbootstrap.com/docs/5.0/layout/breakpoints/#min-width
|
||||
const mobileWidth = 992;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue