From e48ceb15e926e61cc63841c9e6074e06dcf062f7 Mon Sep 17 00:00:00 2001 From: Chaim Lev-Ari Date: Sun, 23 Oct 2022 09:53:25 +0300 Subject: [PATCH] refactor(environments): move environments ts code to react [EE-3443] (#7747) --- app/azure/index.ts | 2 +- app/docker/__module.js | 2 +- app/docker/services/system.service.ts | 2 +- .../AMTDevicesDatatable/AMTDevicesDatatable.tsx | 2 +- .../AMTDevicesDatatable/columns/RowContext.tsx | 2 +- .../AMTDevicesDatatable/useAMTDevices.tsx | 2 +- .../EdgeDevicesDatatable/EdgeDevicesDatatable.tsx | 2 +- .../EdgeDevicesDatatable/EdgeDevicesDatatableActions.tsx | 4 ++-- .../EdgeDevicesDatatableContainer.tsx | 4 ++-- .../EdgeDevicesDatatable/columns/actions.tsx | 6 +++--- .../EdgeDevicesDatatable/columns/group.tsx | 2 +- .../EdgeDevicesDatatable/columns/heartbeat.tsx | 2 +- .../EdgeDevicesDatatable/columns/name.tsx | 2 +- .../EdgeDevices/WaitingRoomView/Datatable/Datatable.tsx | 2 +- app/edge/EdgeDevices/WaitingRoomView/WaitingRoomView.tsx | 4 ++-- app/edge/EdgeDevices/WaitingRoomView/queries.ts | 2 +- app/edge/components/group-form/groupFormController.js | 4 ++-- app/edge/views/edge-jobs/edgeJob/edgeJobController.js | 2 +- .../editEdgeStackView/editEdgeStackViewController.js | 2 +- app/kubernetes/react/views/networks/ingresses/queries.ts | 2 +- app/kubernetes/react/views/networks/ingresses/service.ts | 2 +- app/kubernetes/react/views/networks/services/queries.ts | 2 +- app/kubernetes/react/views/networks/services/service.ts | 2 +- app/kubernetes/services/kubeconfig.service.ts | 2 +- .../associatedEndpointsSelectorController.js | 4 ++-- .../components/forms/group-form/groupFormController.js | 2 +- .../EnvironmentList/EnvironmentItem/AgentVersionTag.tsx | 4 ++-- .../EnvironmentList/EnvironmentItem/EdgeIndicator.tsx | 2 +- .../EnvironmentList/EnvironmentItem/EnvironmentIcon.tsx | 2 +- .../EnvironmentItem/EnvironmentItem.stories.tsx | 2 +- .../EnvironmentItem/EnvironmentItem.test.tsx | 2 +- .../EnvironmentList/EnvironmentItem/EnvironmentItem.tsx | 7 +++++-- .../EnvironmentList/EnvironmentItem/EnvironmentStats.tsx | 7 +++++-- .../EnvironmentItem/EnvironmentStatsDocker.tsx | 2 +- .../EnvironmentItem/EnvironmentStatsKubernetes.tsx | 2 +- .../EnvironmentItem/EnvironmentStatusBadge.tsx | 2 +- .../home/EnvironmentList/EnvironmentList.test.tsx | 2 +- app/portainer/home/EnvironmentList/EnvironmentList.tsx | 8 ++++---- .../KubeconfigButton/KubeconfigButton.tsx | 6 +++--- .../KubeconfigButton/KubeconfigPrompt.tsx | 4 ++-- .../KubeconfigButton/KubeconfigSelection.ts | 2 +- app/portainer/home/HomeView.tsx | 7 ++++--- app/portainer/hooks/useCurrentEnvironment.ts | 2 +- app/portainer/hooks/useUser.tsx | 2 +- .../hostmanagement/open-amt/open-amt.service.ts | 2 +- .../components/access-viewer/access-viewer.controller.js | 2 +- app/portainer/services/nameValidator.js | 2 +- app/portainer/services/types.ts | 2 +- app/portainer/users/types.ts | 2 +- app/portainer/views/auth/authController.js | 2 +- app/portainer/views/endpoints/edit/endpointController.js | 2 +- app/portainer/views/endpoints/endpointsController.js | 2 +- app/portainer/views/init/admin/initAdminController.js | 2 +- app/portainer/views/stacks/edit/stackController.js | 2 +- app/react-tools/test-mocks.ts | 2 +- .../CreateView/useCreateInstanceMutation.tsx | 2 +- .../container-instances/CreateView/useLoadFormState.ts | 2 +- .../azure/container-instances/ListView/ListView.tsx | 2 +- app/react/azure/queries/query-keys.ts | 2 +- app/react/azure/queries/useContainerGroup.ts | 2 +- app/react/azure/queries/useContainerGroups.ts | 2 +- app/react/azure/queries/useProvider.ts | 2 +- app/react/azure/queries/useResourceGroup.ts | 2 +- app/react/azure/queries/useResourceGroups.ts | 2 +- app/react/azure/queries/useSubscription.ts | 2 +- app/react/azure/queries/useSubscriptions.ts | 2 +- app/react/azure/queries/utils.ts | 2 +- app/react/azure/services/container-groups.service.ts | 2 +- .../ListView/ContainersDatatable/ContainersDatatable.tsx | 2 +- .../ContainersDatatable/ContainersDatatableActions.tsx | 2 +- .../ListView/ContainersDatatable/RowContext.ts | 2 +- app/react/docker/containers/ListView/ListView.tsx | 4 ++-- app/react/docker/containers/containers.service.ts | 2 +- app/react/docker/containers/queries/containers.ts | 2 +- app/react/docker/containers/queries/gpus.tsx | 2 +- app/react/docker/containers/queries/query-keys.ts | 2 +- app/react/docker/containers/utils.ts | 2 +- .../docker/networks/ItemView/NetworkContainersTable.tsx | 2 +- app/react/docker/networks/network.service.ts | 2 +- app/react/docker/networks/queries.ts | 2 +- app/react/docker/queries/utils.ts | 2 +- .../docker/stacks/ItemView/StackContainersDatatable.tsx | 2 +- app/react/edge/components/EdgeScriptForm/ScriptTabs.tsx | 2 +- app/react/edge/edge-groups/types.ts | 2 +- .../ingressClass/IngressClassDatatable/RowContext.tsx | 2 +- .../cluster/ingressClass/ingressClass.service.ts | 2 +- app/react/kubernetes/cluster/ingressClass/utils/index.ts | 2 +- app/react/kubernetes/configs/queries.ts | 2 +- app/react/kubernetes/configs/service.ts | 2 +- .../CreateView/CreateNamespaceRegistriesSelector.tsx | 2 +- app/react/kubernetes/namespaces/queries.ts | 2 +- app/react/kubernetes/namespaces/service.ts | 2 +- .../AccessControlPanel/AccessControlPanel.tsx | 2 +- .../AccessControlPanel/AccessControlPanelForm.tsx | 2 +- .../portainer/access-control/EditDetails/EditDetails.tsx | 2 +- .../portainer/access-control/EditDetails/useLoadState.ts | 2 +- .../portainer/environments/environment.service/create.ts | 0 .../portainer/environments/environment.service/edge.ts | 0 .../portainer/environments/environment.service/index.ts | 0 .../environments/environment.service/registries.ts | 0 .../portainer/environments/environment.service/utils.ts | 0 .../portainer/environments/queries/useAgentDetails.ts | 0 .../environments/queries/useAgentVersionsList.ts | 0 .../environments/queries/useCreateEnvironmentMutation.ts | 0 .../portainer/environments/queries/useEnvironment.ts | 4 ++-- .../portainer/environments/queries/useEnvironmentList.ts | 0 app/{ => react}/portainer/environments/types.ts | 0 .../update-schedules/common/ActiveSchedulesNotice.tsx | 2 +- .../update-schedules/common/EnvironmentSelection.tsx | 2 +- .../update-schedules/common/EnvironmentSelectionItem.tsx | 2 +- .../common/UpdateScheduleDetailsFieldset.tsx | 4 ++-- .../environments/update-schedules/common/types.ts | 2 +- .../environments/update-schedules/queries/query-keys.ts | 2 +- .../update-schedules/queries/useActiveSchedules.ts | 2 +- .../update-schedules/queries/usePreviousVersions.ts | 2 +- .../portainer/environments/update-schedules/types.ts | 2 +- .../portainer/environments/utils/get-platform-icon.ts | 7 +++++-- .../portainer/environments/utils/index.ts} | 2 +- .../EnvironmentsCreationView.tsx | 5 ++++- .../EnvironmentsCreationView/WizardAzure/WizardAzure.tsx | 6 +++--- .../WizardDocker/APITab/APIForm.tsx | 4 ++-- .../WizardDocker/APITab/APITab.tsx | 2 +- .../WizardDocker/APITab/DeploymentScripts.tsx | 2 +- .../WizardDocker/APITab/types.ts | 2 +- .../WizardDocker/AgentTab/AgentTab.tsx | 2 +- .../WizardDocker/AgentTab/DeploymentScripts.tsx | 2 +- .../WizardDocker/SocketTab/SocketForm.tsx | 4 ++-- .../WizardDocker/SocketTab/SocketTab.tsx | 2 +- .../WizardDocker/SocketTab/types.ts | 2 +- .../WizardDocker/WizardDocker.tsx | 2 +- .../WizardEndpointsList/WizardEndpointsList.tsx | 6 +++--- .../WizardKubernetes/AgentPanel.tsx | 2 +- .../WizardKubernetes/DeploymentScripts.tsx | 2 +- .../WizardKubernetes/WizardKubernetes.tsx | 2 +- .../shared/AgentForm/AgentForm.tsx | 6 +++--- .../shared/AgentForm/AgentForm.validation.tsx | 2 +- .../shared/EdgeAgentTab/EdgeAgentForm/EdgeAgentForm.tsx | 4 ++-- .../shared/EdgeAgentTab/EdgeAgentForm/types.ts | 2 +- .../shared/EdgeAgentTab/EdgeAgentTab.tsx | 2 +- .../shared/MetadataFieldset/validation.ts | 2 +- .../wizard/EnvironmentsCreationView/shared/NameField.tsx | 2 +- .../EnvironmentsCreationView/useOnlyEdgeOptions.ts | 2 +- .../portainer/environments/wizard/HomeView/HomeView.tsx | 2 +- .../wizard/HomeView/useFetchOrCreateLocalEnvironment.ts | 9 ++++++--- .../AutomaticEdgeEnvCreation.tsx | 2 +- app/react/sidebar/AzureSidebar/AzureSidebar.tsx | 2 +- app/react/sidebar/DockerSidebar.tsx | 2 +- app/react/sidebar/EnvironmentSidebar.tsx | 6 +++--- .../KubernetesSidebar/KubectlShell/KubectlShell.tsx | 2 +- .../KubectlShell/KubectlShellButton.tsx | 2 +- .../sidebar/KubernetesSidebar/KubernetesSidebar.tsx | 2 +- app/react/sidebar/items/DashboardLink.tsx | 2 +- app/react/sidebar/items/VolumesLink.tsx | 2 +- app/react/sidebar/types.ts | 2 +- 154 files changed, 195 insertions(+), 179 deletions(-) rename app/{ => react}/portainer/environments/environment.service/create.ts (100%) rename app/{ => react}/portainer/environments/environment.service/edge.ts (100%) rename app/{ => react}/portainer/environments/environment.service/index.ts (100%) rename app/{ => react}/portainer/environments/environment.service/registries.ts (100%) rename app/{ => react}/portainer/environments/environment.service/utils.ts (100%) rename app/{ => react}/portainer/environments/queries/useAgentDetails.ts (100%) rename app/{ => react}/portainer/environments/queries/useAgentVersionsList.ts (100%) rename app/{ => react}/portainer/environments/queries/useCreateEnvironmentMutation.ts (100%) rename app/{ => react}/portainer/environments/queries/useEnvironment.ts (68%) rename app/{ => react}/portainer/environments/queries/useEnvironmentList.ts (100%) rename app/{ => react}/portainer/environments/types.ts (100%) rename app/{portainer/environments/utils.ts => react/portainer/environments/utils/index.ts} (96%) diff --git a/app/azure/index.ts b/app/azure/index.ts index cb005b21a..a48d33f2f 100644 --- a/app/azure/index.ts +++ b/app/azure/index.ts @@ -1,7 +1,7 @@ import angular from 'angular'; import { StateRegistry, StateService } from '@uirouter/angularjs'; -import { Environment } from '@/portainer/environments/types'; +import { Environment } from '@/react/portainer/environments/types'; import { notifyError } from '@/portainer/services/notifications'; import { EndpointProvider, StateManager } from '@/portainer/services/types'; diff --git a/app/docker/__module.js b/app/docker/__module.js index fc94883f4..59f613677 100644 --- a/app/docker/__module.js +++ b/app/docker/__module.js @@ -1,6 +1,6 @@ import angular from 'angular'; -import { EnvironmentStatus } from '@/portainer/environments/types'; +import { EnvironmentStatus } from '@/react/portainer/environments/types'; import { reactModule } from './react'; diff --git a/app/docker/services/system.service.ts b/app/docker/services/system.service.ts index dae7dd402..b7a16aaf9 100644 --- a/app/docker/services/system.service.ts +++ b/app/docker/services/system.service.ts @@ -1,6 +1,6 @@ import { useQuery } from 'react-query'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import axios, { parseAxiosError } from '@/portainer/services/axios'; export interface VersionResponse { diff --git a/app/edge/EdgeDevices/EdgeDevicesView/AMTDevicesDatatable/AMTDevicesDatatable.tsx b/app/edge/EdgeDevices/EdgeDevicesView/AMTDevicesDatatable/AMTDevicesDatatable.tsx index b6bb34561..1dda53530 100644 --- a/app/edge/EdgeDevices/EdgeDevicesView/AMTDevicesDatatable/AMTDevicesDatatable.tsx +++ b/app/edge/EdgeDevices/EdgeDevicesView/AMTDevicesDatatable/AMTDevicesDatatable.tsx @@ -3,7 +3,7 @@ import { usePagination, useTable } from 'react-table'; import { Device } from '@/portainer/hostmanagement/open-amt/model'; import { useAMTDevices } from '@/edge/EdgeDevices/EdgeDevicesView/AMTDevicesDatatable/useAMTDevices'; import { RowProvider } from '@/edge/EdgeDevices/EdgeDevicesView/AMTDevicesDatatable/columns/RowContext'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import PortainerError from '@/portainer/error'; import { InnerDatatable } from '@@/datatables/InnerDatatable'; diff --git a/app/edge/EdgeDevices/EdgeDevicesView/AMTDevicesDatatable/columns/RowContext.tsx b/app/edge/EdgeDevices/EdgeDevicesView/AMTDevicesDatatable/columns/RowContext.tsx index 1d77071ac..461fa063c 100644 --- a/app/edge/EdgeDevices/EdgeDevicesView/AMTDevicesDatatable/columns/RowContext.tsx +++ b/app/edge/EdgeDevices/EdgeDevicesView/AMTDevicesDatatable/columns/RowContext.tsx @@ -1,6 +1,6 @@ import { PropsWithChildren, useMemo, useReducer } from 'react'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { createRowContext } from '@@/datatables/RowContext'; diff --git a/app/edge/EdgeDevices/EdgeDevicesView/AMTDevicesDatatable/useAMTDevices.tsx b/app/edge/EdgeDevices/EdgeDevicesView/AMTDevicesDatatable/useAMTDevices.tsx index a38ad5816..8523c0e1f 100644 --- a/app/edge/EdgeDevices/EdgeDevicesView/AMTDevicesDatatable/useAMTDevices.tsx +++ b/app/edge/EdgeDevices/EdgeDevicesView/AMTDevicesDatatable/useAMTDevices.tsx @@ -2,7 +2,7 @@ import { useEffect, useMemo } from 'react'; import { useQuery } from 'react-query'; import { getDevices } from '@/portainer/hostmanagement/open-amt/open-amt.service'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import PortainerError from '@/portainer/error'; import * as notifications from '@/portainer/services/notifications'; diff --git a/app/edge/EdgeDevices/EdgeDevicesView/EdgeDevicesDatatable/EdgeDevicesDatatable.tsx b/app/edge/EdgeDevices/EdgeDevicesView/EdgeDevicesDatatable/EdgeDevicesDatatable.tsx index 8c8384cda..f46205f2d 100644 --- a/app/edge/EdgeDevices/EdgeDevicesView/EdgeDevicesDatatable/EdgeDevicesDatatable.tsx +++ b/app/edge/EdgeDevices/EdgeDevicesView/EdgeDevicesDatatable/EdgeDevicesDatatable.tsx @@ -2,7 +2,7 @@ import { useTable, useExpanded, useSortBy, useFilters } from 'react-table'; import { useRowSelectColumn } from '@lineup-lite/hooks'; import _ from 'lodash'; -import { Environment } from '@/portainer/environments/types'; +import { Environment } from '@/react/portainer/environments/types'; import { AMTDevicesDatatable } from '@/edge/EdgeDevices/EdgeDevicesView/AMTDevicesDatatable/AMTDevicesDatatable'; import { EnvironmentGroup } from '@/portainer/environment-groups/types'; diff --git a/app/edge/EdgeDevices/EdgeDevicesView/EdgeDevicesDatatable/EdgeDevicesDatatableActions.tsx b/app/edge/EdgeDevices/EdgeDevicesView/EdgeDevicesDatatable/EdgeDevicesDatatableActions.tsx index 9e052651b..c8768769a 100644 --- a/app/edge/EdgeDevices/EdgeDevicesView/EdgeDevicesDatatable/EdgeDevicesDatatableActions.tsx +++ b/app/edge/EdgeDevices/EdgeDevicesView/EdgeDevicesDatatable/EdgeDevicesDatatableActions.tsx @@ -1,6 +1,6 @@ import { useRouter } from '@uirouter/react'; -import type { Environment } from '@/portainer/environments/types'; +import type { Environment } from '@/react/portainer/environments/types'; import { confirmAsync, confirmDestructiveAsync, @@ -8,7 +8,7 @@ import { import { promptAsync } from '@/portainer/services/modal.service/prompt'; import * as notifications from '@/portainer/services/notifications'; import { activateDevice } from '@/portainer/hostmanagement/open-amt/open-amt.service'; -import { deleteEndpoint } from '@/portainer/environments/environment.service'; +import { deleteEndpoint } from '@/react/portainer/environments/environment.service'; import { Button } from '@@/buttons'; import { Link } from '@@/Link'; diff --git a/app/edge/EdgeDevices/EdgeDevicesView/EdgeDevicesDatatable/EdgeDevicesDatatableContainer.tsx b/app/edge/EdgeDevices/EdgeDevicesView/EdgeDevicesDatatable/EdgeDevicesDatatableContainer.tsx index c6e2b6672..49a81337d 100644 --- a/app/edge/EdgeDevices/EdgeDevicesView/EdgeDevicesDatatable/EdgeDevicesDatatableContainer.tsx +++ b/app/edge/EdgeDevices/EdgeDevicesView/EdgeDevicesDatatable/EdgeDevicesDatatableContainer.tsx @@ -1,7 +1,7 @@ import { useState } from 'react'; -import { useEnvironmentList } from '@/portainer/environments/queries/useEnvironmentList'; -import { EdgeTypes, Environment } from '@/portainer/environments/types'; +import { useEnvironmentList } from '@/react/portainer/environments/queries/useEnvironmentList'; +import { EdgeTypes, Environment } from '@/react/portainer/environments/types'; import { useDebounce } from '@/portainer/hooks/useDebounce'; import { useSearchBarState } from '@@/datatables/SearchBar'; diff --git a/app/edge/EdgeDevices/EdgeDevicesView/EdgeDevicesDatatable/columns/actions.tsx b/app/edge/EdgeDevices/EdgeDevicesView/EdgeDevicesDatatable/columns/actions.tsx index 19c282c1b..1fd236324 100644 --- a/app/edge/EdgeDevices/EdgeDevicesView/EdgeDevicesDatatable/columns/actions.tsx +++ b/app/edge/EdgeDevices/EdgeDevicesView/EdgeDevicesDatatable/columns/actions.tsx @@ -2,10 +2,10 @@ import { CellProps, Column } from 'react-table'; import { MenuItem, MenuLink } from '@reach/menu-button'; import { useRouter, useSref } from '@uirouter/react'; -import { Environment } from '@/portainer/environments/types'; -import { snapshotEndpoint } from '@/portainer/environments/environment.service'; +import { Environment } from '@/react/portainer/environments/types'; +import { snapshotEndpoint } from '@/react/portainer/environments/environment.service'; import * as notifications from '@/portainer/services/notifications'; -import { getRoute } from '@/portainer/environments/utils'; +import { getRoute } from '@/react/portainer/environments/utils'; import { ActionsMenu } from '@@/datatables/ActionsMenu'; diff --git a/app/edge/EdgeDevices/EdgeDevicesView/EdgeDevicesDatatable/columns/group.tsx b/app/edge/EdgeDevices/EdgeDevicesView/EdgeDevicesDatatable/columns/group.tsx index 69d8dcf38..45e8a52eb 100644 --- a/app/edge/EdgeDevices/EdgeDevicesView/EdgeDevicesDatatable/columns/group.tsx +++ b/app/edge/EdgeDevices/EdgeDevicesView/EdgeDevicesDatatable/columns/group.tsx @@ -1,6 +1,6 @@ import { Column } from 'react-table'; -import { Environment } from '@/portainer/environments/types'; +import { Environment } from '@/react/portainer/environments/types'; import { DefaultFilter } from '@@/datatables/Filter'; diff --git a/app/edge/EdgeDevices/EdgeDevicesView/EdgeDevicesDatatable/columns/heartbeat.tsx b/app/edge/EdgeDevices/EdgeDevicesView/EdgeDevicesDatatable/columns/heartbeat.tsx index ba8bfc3fa..b3adba5ec 100644 --- a/app/edge/EdgeDevices/EdgeDevicesView/EdgeDevicesDatatable/columns/heartbeat.tsx +++ b/app/edge/EdgeDevices/EdgeDevicesView/EdgeDevicesDatatable/columns/heartbeat.tsx @@ -1,6 +1,6 @@ import { CellProps, Column } from 'react-table'; -import { Environment } from '@/portainer/environments/types'; +import { Environment } from '@/react/portainer/environments/types'; import { EdgeIndicator } from '@/portainer/home/EnvironmentList/EnvironmentItem/EdgeIndicator'; export const heartbeat: Column = { diff --git a/app/edge/EdgeDevices/EdgeDevicesView/EdgeDevicesDatatable/columns/name.tsx b/app/edge/EdgeDevices/EdgeDevicesView/EdgeDevicesDatatable/columns/name.tsx index 65db6a6ef..197a2ba9e 100644 --- a/app/edge/EdgeDevices/EdgeDevicesView/EdgeDevicesDatatable/columns/name.tsx +++ b/app/edge/EdgeDevices/EdgeDevicesView/EdgeDevicesDatatable/columns/name.tsx @@ -1,6 +1,6 @@ import { CellProps, Column } from 'react-table'; -import { Environment } from '@/portainer/environments/types'; +import { Environment } from '@/react/portainer/environments/types'; import { Link } from '@@/Link'; import { ExpandingCell } from '@@/datatables/ExpandingCell'; diff --git a/app/edge/EdgeDevices/WaitingRoomView/Datatable/Datatable.tsx b/app/edge/EdgeDevices/WaitingRoomView/Datatable/Datatable.tsx index 1dea9fd06..a63870258 100644 --- a/app/edge/EdgeDevices/WaitingRoomView/Datatable/Datatable.tsx +++ b/app/edge/EdgeDevices/WaitingRoomView/Datatable/Datatable.tsx @@ -8,7 +8,7 @@ import { } from 'react-table'; import { useRowSelectColumn } from '@lineup-lite/hooks'; -import { Environment } from '@/portainer/environments/types'; +import { Environment } from '@/react/portainer/environments/types'; import { notifySuccess } from '@/portainer/services/notifications'; import { Button } from '@@/buttons'; diff --git a/app/edge/EdgeDevices/WaitingRoomView/WaitingRoomView.tsx b/app/edge/EdgeDevices/WaitingRoomView/WaitingRoomView.tsx index 698181b84..627021e7c 100644 --- a/app/edge/EdgeDevices/WaitingRoomView/WaitingRoomView.tsx +++ b/app/edge/EdgeDevices/WaitingRoomView/WaitingRoomView.tsx @@ -1,7 +1,7 @@ import { useRouter } from '@uirouter/react'; -import { useEnvironmentList } from '@/portainer/environments/queries/useEnvironmentList'; -import { EdgeTypes } from '@/portainer/environments/types'; +import { useEnvironmentList } from '@/react/portainer/environments/queries/useEnvironmentList'; +import { EdgeTypes } from '@/react/portainer/environments/types'; import { InformationPanel } from '@@/InformationPanel'; import { TextTip } from '@@/Tip/TextTip'; diff --git a/app/edge/EdgeDevices/WaitingRoomView/queries.ts b/app/edge/EdgeDevices/WaitingRoomView/queries.ts index a7dd8e5e0..a930de9af 100644 --- a/app/edge/EdgeDevices/WaitingRoomView/queries.ts +++ b/app/edge/EdgeDevices/WaitingRoomView/queries.ts @@ -1,6 +1,6 @@ import { useMutation, useQueryClient } from 'react-query'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { promiseSequence } from '@/portainer/helpers/promise-utils'; diff --git a/app/edge/components/group-form/groupFormController.js b/app/edge/components/group-form/groupFormController.js index 7ff76bf18..1bed6652d 100644 --- a/app/edge/components/group-form/groupFormController.js +++ b/app/edge/components/group-form/groupFormController.js @@ -1,7 +1,7 @@ import _ from 'lodash-es'; import { confirmDestructiveAsync } from '@/portainer/services/modal.service/confirm'; -import { EdgeTypes } from '@/portainer/environments/types'; -import { getEnvironments } from '@/portainer/environments/environment.service'; +import { EdgeTypes } from '@/react/portainer/environments/types'; +import { getEnvironments } from '@/react/portainer/environments/environment.service'; export class EdgeGroupFormController { /* @ngInject */ diff --git a/app/edge/views/edge-jobs/edgeJob/edgeJobController.js b/app/edge/views/edge-jobs/edgeJob/edgeJobController.js index 1251e41ad..dc004461f 100644 --- a/app/edge/views/edge-jobs/edgeJob/edgeJobController.js +++ b/app/edge/views/edge-jobs/edgeJob/edgeJobController.js @@ -1,5 +1,5 @@ import _ from 'lodash-es'; -import { getEnvironments } from '@/portainer/environments/environment.service'; +import { getEnvironments } from '@/react/portainer/environments/environment.service'; export class EdgeJobController { /* @ngInject */ diff --git a/app/edge/views/edge-stacks/editEdgeStackView/editEdgeStackViewController.js b/app/edge/views/edge-stacks/editEdgeStackView/editEdgeStackViewController.js index 0b5bef7da..9110610c5 100644 --- a/app/edge/views/edge-stacks/editEdgeStackView/editEdgeStackViewController.js +++ b/app/edge/views/edge-stacks/editEdgeStackView/editEdgeStackViewController.js @@ -1,5 +1,5 @@ import _ from 'lodash-es'; -import { getEnvironments } from '@/portainer/environments/environment.service'; +import { getEnvironments } from '@/react/portainer/environments/environment.service'; export class EditEdgeStackViewController { /* @ngInject */ diff --git a/app/kubernetes/react/views/networks/ingresses/queries.ts b/app/kubernetes/react/views/networks/ingresses/queries.ts index a1ed77deb..5c0f882f6 100644 --- a/app/kubernetes/react/views/networks/ingresses/queries.ts +++ b/app/kubernetes/react/views/networks/ingresses/queries.ts @@ -1,6 +1,6 @@ import { useQuery, useMutation, useQueryClient } from 'react-query'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { mutationOptions, withError, diff --git a/app/kubernetes/react/views/networks/ingresses/service.ts b/app/kubernetes/react/views/networks/ingresses/service.ts index 490d98614..2cd4d3960 100644 --- a/app/kubernetes/react/views/networks/ingresses/service.ts +++ b/app/kubernetes/react/views/networks/ingresses/service.ts @@ -1,5 +1,5 @@ import axios, { parseAxiosError } from '@/portainer/services/axios'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { Ingress, DeleteIngressesRequest, IngressController } from './types'; diff --git a/app/kubernetes/react/views/networks/services/queries.ts b/app/kubernetes/react/views/networks/services/queries.ts index e3cdf8e12..ccf2e868d 100644 --- a/app/kubernetes/react/views/networks/services/queries.ts +++ b/app/kubernetes/react/views/networks/services/queries.ts @@ -1,6 +1,6 @@ import { useQuery } from 'react-query'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { error as notifyError } from '@/portainer/services/notifications'; import { getServices } from './service'; diff --git a/app/kubernetes/react/views/networks/services/service.ts b/app/kubernetes/react/views/networks/services/service.ts index 7b6b2c6e0..5ea7c27e9 100644 --- a/app/kubernetes/react/views/networks/services/service.ts +++ b/app/kubernetes/react/views/networks/services/service.ts @@ -1,5 +1,5 @@ import axios, { parseAxiosError } from '@/portainer/services/axios'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { Service } from './types'; diff --git a/app/kubernetes/services/kubeconfig.service.ts b/app/kubernetes/services/kubeconfig.service.ts index 72ccb6c5a..8347f638c 100644 --- a/app/kubernetes/services/kubeconfig.service.ts +++ b/app/kubernetes/services/kubeconfig.service.ts @@ -1,7 +1,7 @@ import { saveAs } from 'file-saver'; import axios, { parseAxiosError } from '@/portainer/services/axios'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; const baseUrl = 'kubernetes'; diff --git a/app/portainer/components/associated-endpoints-selector/associatedEndpointsSelectorController.js b/app/portainer/components/associated-endpoints-selector/associatedEndpointsSelectorController.js index 923485188..8e8a4d9c0 100644 --- a/app/portainer/components/associated-endpoints-selector/associatedEndpointsSelectorController.js +++ b/app/portainer/components/associated-endpoints-selector/associatedEndpointsSelectorController.js @@ -1,8 +1,8 @@ import angular from 'angular'; import _ from 'lodash-es'; -import { EdgeTypes } from '@/portainer/environments/types'; -import { getEnvironments } from '@/portainer/environments/environment.service'; +import { EdgeTypes } from '@/react/portainer/environments/types'; +import { getEnvironments } from '@/react/portainer/environments/environment.service'; import { getTags } from '@/portainer/tags/tags.service'; class AssoicatedEndpointsSelectorController { diff --git a/app/portainer/components/forms/group-form/groupFormController.js b/app/portainer/components/forms/group-form/groupFormController.js index 2e2ac5524..22dce5741 100644 --- a/app/portainer/components/forms/group-form/groupFormController.js +++ b/app/portainer/components/forms/group-form/groupFormController.js @@ -1,6 +1,6 @@ import _ from 'lodash-es'; import angular from 'angular'; -import { endpointsByGroup } from '@/portainer/environments/environment.service'; +import { endpointsByGroup } from '@/react/portainer/environments/environment.service'; import { notifyError } from '@/portainer/services/notifications'; class GroupFormController { diff --git a/app/portainer/home/EnvironmentList/EnvironmentItem/AgentVersionTag.tsx b/app/portainer/home/EnvironmentList/EnvironmentItem/AgentVersionTag.tsx index 310c25667..c446c3e1b 100644 --- a/app/portainer/home/EnvironmentList/EnvironmentItem/AgentVersionTag.tsx +++ b/app/portainer/home/EnvironmentList/EnvironmentItem/AgentVersionTag.tsx @@ -1,10 +1,10 @@ import { Zap } from 'react-feather'; -import { EnvironmentType } from '@/portainer/environments/types'; +import { EnvironmentType } from '@/react/portainer/environments/types'; import { isAgentEnvironment, isEdgeEnvironment, -} from '@/portainer/environments/utils'; +} from '@/react/portainer/environments/utils'; interface Props { type: EnvironmentType; diff --git a/app/portainer/home/EnvironmentList/EnvironmentItem/EdgeIndicator.tsx b/app/portainer/home/EnvironmentList/EnvironmentItem/EdgeIndicator.tsx index 74ee343f9..0df4641e9 100644 --- a/app/portainer/home/EnvironmentList/EnvironmentItem/EdgeIndicator.tsx +++ b/app/portainer/home/EnvironmentList/EnvironmentItem/EdgeIndicator.tsx @@ -1,7 +1,7 @@ import clsx from 'clsx'; import { isoDateFromTimestamp } from '@/portainer/filters/filters'; -import { Environment } from '@/portainer/environments/types'; +import { Environment } from '@/react/portainer/environments/types'; import { usePublicSettings } from '@/react/portainer/settings/queries'; import { PublicSettingsViewModel } from '@/portainer/models/settings'; diff --git a/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentIcon.tsx b/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentIcon.tsx index d301f3d93..69b79c22a 100644 --- a/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentIcon.tsx +++ b/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentIcon.tsx @@ -4,7 +4,7 @@ import { environmentTypeIcon } from '@/portainer/filters/filters'; import dockerEdge from '@/assets/images/edge_endpoint.png'; import kube from '@/assets/images/kubernetes_endpoint.png'; import kubeEdge from '@/assets/images/kubernetes_edge_endpoint.png'; -import { EnvironmentType } from '@/portainer/environments/types'; +import { EnvironmentType } from '@/react/portainer/environments/types'; import azure from '@/assets/ico/vendor/azure.svg'; import docker from '@/assets/ico/vendor/docker.svg'; diff --git a/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentItem.stories.tsx b/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentItem.stories.tsx index 89fc50974..c42d05751 100644 --- a/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentItem.stories.tsx +++ b/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentItem.stories.tsx @@ -4,7 +4,7 @@ import { Environment, EnvironmentStatus, EnvironmentType, -} from '@/portainer/environments/types'; +} from '@/react/portainer/environments/types'; import { createMockEnvironment } from '@/react-tools/test-mocks'; import { EnvironmentItem } from './EnvironmentItem'; diff --git a/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentItem.test.tsx b/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentItem.test.tsx index 826d97e10..3fb17b7af 100644 --- a/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentItem.test.tsx +++ b/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentItem.test.tsx @@ -2,7 +2,7 @@ import { EnvironmentGroup, EnvironmentGroupId, } from '@/portainer/environment-groups/types'; -import { Environment } from '@/portainer/environments/types'; +import { Environment } from '@/react/portainer/environments/types'; import { UserContext } from '@/portainer/hooks/useUser'; import { UserViewModel } from '@/portainer/models/user'; import { Tag } from '@/portainer/tags/types'; diff --git a/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentItem.tsx b/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentItem.tsx index 892e2d5f1..8215cb1aa 100644 --- a/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentItem.tsx +++ b/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentItem.tsx @@ -7,12 +7,15 @@ import { humanize, stripProtocol, } from '@/portainer/filters/filters'; -import { type Environment, PlatformType } from '@/portainer/environments/types'; +import { + type Environment, + PlatformType, +} from '@/react/portainer/environments/types'; import { getPlatformType, isDockerEnvironment, isEdgeEnvironment, -} from '@/portainer/environments/utils'; +} from '@/react/portainer/environments/utils'; import type { TagId } from '@/portainer/tags/types'; import { useTags } from '@/portainer/tags/queries'; import { useUser } from '@/portainer/hooks/useUser'; diff --git a/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentStats.tsx b/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentStats.tsx index 1391e8c86..ad4f7d20e 100644 --- a/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentStats.tsx +++ b/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentStats.tsx @@ -1,5 +1,8 @@ -import { Environment, PlatformType } from '@/portainer/environments/types'; -import { getPlatformType } from '@/portainer/environments/utils'; +import { + Environment, + PlatformType, +} from '@/react/portainer/environments/types'; +import { getPlatformType } from '@/react/portainer/environments/utils'; import { EnvironmentStatsDocker } from './EnvironmentStatsDocker'; import { EnvironmentStatsKubernetes } from './EnvironmentStatsKubernetes'; diff --git a/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentStatsDocker.tsx b/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentStatsDocker.tsx index d0e768b23..d4a4d4161 100644 --- a/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentStatsDocker.tsx +++ b/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentStatsDocker.tsx @@ -1,7 +1,7 @@ import { DockerSnapshot, EnvironmentType, -} from '@/portainer/environments/types'; +} from '@/react/portainer/environments/types'; import { addPlural } from '@/portainer/helpers/strings'; import { AgentVersionTag } from './AgentVersionTag'; diff --git a/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentStatsKubernetes.tsx b/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentStatsKubernetes.tsx index 8881eb6e3..c43f78efd 100644 --- a/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentStatsKubernetes.tsx +++ b/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentStatsKubernetes.tsx @@ -1,7 +1,7 @@ import { EnvironmentType, KubernetesSnapshot, -} from '@/portainer/environments/types'; +} from '@/react/portainer/environments/types'; import { humanize } from '@/portainer/filters/filters'; import { addPlural } from '@/portainer/helpers/strings'; diff --git a/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentStatusBadge.tsx b/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentStatusBadge.tsx index 778d88779..482cf952f 100644 --- a/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentStatusBadge.tsx +++ b/app/portainer/home/EnvironmentList/EnvironmentItem/EnvironmentStatusBadge.tsx @@ -1,6 +1,6 @@ import clsx from 'clsx'; -import { EnvironmentStatus } from '@/portainer/environments/types'; +import { EnvironmentStatus } from '@/react/portainer/environments/types'; interface Props { status: EnvironmentStatus; diff --git a/app/portainer/home/EnvironmentList/EnvironmentList.test.tsx b/app/portainer/home/EnvironmentList/EnvironmentList.test.tsx index 8db69b86c..9cdf468d8 100644 --- a/app/portainer/home/EnvironmentList/EnvironmentList.test.tsx +++ b/app/portainer/home/EnvironmentList/EnvironmentList.test.tsx @@ -1,4 +1,4 @@ -import { Environment } from '@/portainer/environments/types'; +import { Environment } from '@/react/portainer/environments/types'; import { UserContext } from '@/portainer/hooks/useUser'; import { UserViewModel } from '@/portainer/models/user'; import { renderWithQueryClient } from '@/react-tools/test-utils'; diff --git a/app/portainer/home/EnvironmentList/EnvironmentList.tsx b/app/portainer/home/EnvironmentList/EnvironmentList.tsx index 0cde258dd..267651189 100644 --- a/app/portainer/home/EnvironmentList/EnvironmentList.tsx +++ b/app/portainer/home/EnvironmentList/EnvironmentList.tsx @@ -10,7 +10,7 @@ import { EnvironmentStatus, PlatformType, EdgeTypes, -} from '@/portainer/environments/types'; +} from '@/react/portainer/environments/types'; import { EnvironmentGroupId } from '@/portainer/environment-groups/types'; import { HomepageFilter, @@ -20,12 +20,12 @@ import { useDebounce } from '@/portainer/hooks/useDebounce'; import { refetchIfAnyOffline, useEnvironmentList, -} from '@/portainer/environments/queries/useEnvironmentList'; +} from '@/react/portainer/environments/queries/useEnvironmentList'; import { useGroups } from '@/portainer/environment-groups/queries'; import { useTags } from '@/portainer/tags/queries'; import { Filter } from '@/portainer/home/types'; -import { useAgentVersionsList } from '@/portainer/environments/queries/useAgentVersionsList'; -import { EnvironmentsQueryParams } from '@/portainer/environments/environment.service'; +import { useAgentVersionsList } from '@/react/portainer/environments/queries/useAgentVersionsList'; +import { EnvironmentsQueryParams } from '@/react/portainer/environments/environment.service'; import { useUser } from '@/portainer/hooks/useUser'; import { TableFooter } from '@@/datatables/TableFooter'; diff --git a/app/portainer/home/EnvironmentList/KubeconfigButton/KubeconfigButton.tsx b/app/portainer/home/EnvironmentList/KubeconfigButton/KubeconfigButton.tsx index 6d8002b5a..265a5c025 100644 --- a/app/portainer/home/EnvironmentList/KubeconfigButton/KubeconfigButton.tsx +++ b/app/portainer/home/EnvironmentList/KubeconfigButton/KubeconfigButton.tsx @@ -1,10 +1,10 @@ import { useState } from 'react'; import { Download } from 'react-feather'; -import { Environment } from '@/portainer/environments/types'; -import { isKubernetesEnvironment } from '@/portainer/environments/utils'; +import { Environment } from '@/react/portainer/environments/types'; +import { isKubernetesEnvironment } from '@/react/portainer/environments/utils'; import { trackEvent } from '@/angulartics.matomo/analytics-services'; -import { Query } from '@/portainer/environments/queries/useEnvironmentList'; +import { Query } from '@/react/portainer/environments/queries/useEnvironmentList'; import { Button } from '@@/buttons'; diff --git a/app/portainer/home/EnvironmentList/KubeconfigButton/KubeconfigPrompt.tsx b/app/portainer/home/EnvironmentList/KubeconfigButton/KubeconfigPrompt.tsx index 865e05f64..5349ad733 100644 --- a/app/portainer/home/EnvironmentList/KubeconfigButton/KubeconfigPrompt.tsx +++ b/app/portainer/home/EnvironmentList/KubeconfigButton/KubeconfigPrompt.tsx @@ -5,13 +5,13 @@ import { DialogOverlay } from '@reach/dialog'; import * as kcService from '@/kubernetes/services/kubeconfig.service'; import * as notifications from '@/portainer/services/notifications'; -import { EnvironmentType } from '@/portainer/environments/types'; +import { EnvironmentType } from '@/react/portainer/environments/types'; import { usePaginationLimitState } from '@/portainer/hooks/usePaginationLimitState'; import { usePublicSettings } from '@/react/portainer/settings/queries'; import { Query, useEnvironmentList, -} from '@/portainer/environments/queries/useEnvironmentList'; +} from '@/react/portainer/environments/queries/useEnvironmentList'; import { PaginationControls } from '@@/PaginationControls'; import { Checkbox } from '@@/form-components/Checkbox'; diff --git a/app/portainer/home/EnvironmentList/KubeconfigButton/KubeconfigSelection.ts b/app/portainer/home/EnvironmentList/KubeconfigButton/KubeconfigSelection.ts index ee4b07ba8..a3ac3a23c 100644 --- a/app/portainer/home/EnvironmentList/KubeconfigButton/KubeconfigSelection.ts +++ b/app/portainer/home/EnvironmentList/KubeconfigButton/KubeconfigSelection.ts @@ -1,6 +1,6 @@ import { useState } from 'react'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; export function useSelection() { const [selection, setSelection] = useState>( diff --git a/app/portainer/home/HomeView.tsx b/app/portainer/home/HomeView.tsx index d6121b707..d1e656f56 100644 --- a/app/portainer/home/HomeView.tsx +++ b/app/portainer/home/HomeView.tsx @@ -1,12 +1,13 @@ import { useRouter } from '@uirouter/react'; import { useState } from 'react'; +import { Environment } from '@/react/portainer/environments/types'; +import { snapshotEndpoints } from '@/react/portainer/environments/environment.service'; +import { isEdgeEnvironment } from '@/react/portainer/environments/utils'; + import { PageHeader } from '@@/PageHeader'; import * as notifications from '../services/notifications'; -import { Environment } from '../environments/types'; -import { snapshotEndpoints } from '../environments/environment.service'; -import { isEdgeEnvironment } from '../environments/utils'; import { confirmAsync } from '../services/modal.service/confirm'; import { buildTitle } from '../services/modal.service/utils'; diff --git a/app/portainer/hooks/useCurrentEnvironment.ts b/app/portainer/hooks/useCurrentEnvironment.ts index 714dc282d..70a2c9ada 100644 --- a/app/portainer/hooks/useCurrentEnvironment.ts +++ b/app/portainer/hooks/useCurrentEnvironment.ts @@ -1,4 +1,4 @@ -import { useEnvironment } from '../environments/queries/useEnvironment'; +import { useEnvironment } from '@/react/portainer/environments/queries/useEnvironment'; import { useEnvironmentId } from './useEnvironmentId'; diff --git a/app/portainer/hooks/useUser.tsx b/app/portainer/hooks/useUser.tsx index fb6bd2850..9c9d8517c 100644 --- a/app/portainer/hooks/useUser.tsx +++ b/app/portainer/hooks/useUser.tsx @@ -11,10 +11,10 @@ import { } from 'react'; import { isAdmin } from '@/portainer/users/user.helpers'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { getUser } from '../users/user.service'; import { User, UserId } from '../users/types'; -import { EnvironmentId } from '../environments/types'; import { useLocalStorage } from './useLocalStorage'; diff --git a/app/portainer/hostmanagement/open-amt/open-amt.service.ts b/app/portainer/hostmanagement/open-amt/open-amt.service.ts index 378143bd2..eabd14a66 100644 --- a/app/portainer/hostmanagement/open-amt/open-amt.service.ts +++ b/app/portainer/hostmanagement/open-amt/open-amt.service.ts @@ -1,5 +1,5 @@ import axios, { parseAxiosError } from '@/portainer/services/axios'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { OpenAMTConfiguration, diff --git a/app/portainer/rbac/components/access-viewer/access-viewer.controller.js b/app/portainer/rbac/components/access-viewer/access-viewer.controller.js index bd20c318f..01d97fd81 100644 --- a/app/portainer/rbac/components/access-viewer/access-viewer.controller.js +++ b/app/portainer/rbac/components/access-viewer/access-viewer.controller.js @@ -1,7 +1,7 @@ import _ from 'lodash-es'; import { isLimitedToBE } from '@/portainer/feature-flags/feature-flags.service'; -import { getEnvironments } from '@/portainer/environments/environment.service'; +import { getEnvironments } from '@/react/portainer/environments/environment.service'; import AccessViewerPolicyModel from '../../models/access'; export default class AccessViewerController { diff --git a/app/portainer/services/nameValidator.js b/app/portainer/services/nameValidator.js index fa4f3fe2e..bf3ca58d2 100644 --- a/app/portainer/services/nameValidator.js +++ b/app/portainer/services/nameValidator.js @@ -1,5 +1,5 @@ import angular from 'angular'; -import { getEnvironments } from '../environments/environment.service'; +import { getEnvironments } from '@/react/portainer/environments/environment.service'; angular.module('portainer.app').factory('NameValidator', NameValidatorFactory); /* @ngInject */ diff --git a/app/portainer/services/types.ts b/app/portainer/services/types.ts index a4e17ef59..af8895e80 100644 --- a/app/portainer/services/types.ts +++ b/app/portainer/services/types.ts @@ -1,4 +1,4 @@ -import { Environment } from '../environments/types'; +import { Environment } from '@/react/portainer/environments/types'; export interface EndpointProvider { setEndpointID(id: Environment['Id']): void; diff --git a/app/portainer/users/types.ts b/app/portainer/users/types.ts index b51673f20..d92b4d5e3 100644 --- a/app/portainer/users/types.ts +++ b/app/portainer/users/types.ts @@ -1,4 +1,4 @@ -import { EnvironmentId } from '../environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; export type UserId = number; diff --git a/app/portainer/views/auth/authController.js b/app/portainer/views/auth/authController.js index 56e7ac9a3..da92669ae 100644 --- a/app/portainer/views/auth/authController.js +++ b/app/portainer/views/auth/authController.js @@ -1,6 +1,6 @@ import angular from 'angular'; import uuidv4 from 'uuid/v4'; -import { getEnvironments } from '@/portainer/environments/environment.service'; +import { getEnvironments } from '@/react/portainer/environments/environment.service'; class AuthenticationController { /* @ngInject */ diff --git a/app/portainer/views/endpoints/edit/endpointController.js b/app/portainer/views/endpoints/edit/endpointController.js index 4ea9ef956..54c064201 100644 --- a/app/portainer/views/endpoints/edit/endpointController.js +++ b/app/portainer/views/endpoints/edit/endpointController.js @@ -6,7 +6,7 @@ import { EndpointSecurityFormData } from '@/portainer/components/endpointSecurit import EndpointHelper from '@/portainer/helpers/endpointHelper'; import { getAMTInfo } from 'Portainer/hostmanagement/open-amt/open-amt.service'; import { confirmDestructiveAsync } from '@/portainer/services/modal.service/confirm'; -import { isEdgeEnvironment } from '@/portainer/environments/utils'; +import { isEdgeEnvironment } from '@/react/portainer/environments/utils'; import { commandsTabs } from '@/react/edge/components/EdgeScriptForm/scripts'; import { GpusListAngular } from '@/react/portainer/environments/wizard/EnvironmentsCreationView/shared/Hardware/GpusList'; diff --git a/app/portainer/views/endpoints/endpointsController.js b/app/portainer/views/endpoints/endpointsController.js index 4bf3c6f82..07f09ed62 100644 --- a/app/portainer/views/endpoints/endpointsController.js +++ b/app/portainer/views/endpoints/endpointsController.js @@ -1,6 +1,6 @@ import { map } from 'lodash'; import EndpointHelper from '@/portainer/helpers/endpointHelper'; -import { getEnvironments } from '@/portainer/environments/environment.service'; +import { getEnvironments } from '@/react/portainer/environments/environment.service'; export class EndpointsController { /* @ngInject */ diff --git a/app/portainer/views/init/admin/initAdminController.js b/app/portainer/views/init/admin/initAdminController.js index a2940115a..4783c10ab 100644 --- a/app/portainer/views/init/admin/initAdminController.js +++ b/app/portainer/views/init/admin/initAdminController.js @@ -1,4 +1,4 @@ -import { getEnvironments } from '@/portainer/environments/environment.service'; +import { getEnvironments } from '@/react/portainer/environments/environment.service'; angular.module('portainer.app').controller('InitAdminController', [ '$scope', diff --git a/app/portainer/views/stacks/edit/stackController.js b/app/portainer/views/stacks/edit/stackController.js index e9bcd2c9b..13783eba0 100644 --- a/app/portainer/views/stacks/edit/stackController.js +++ b/app/portainer/views/stacks/edit/stackController.js @@ -1,7 +1,7 @@ import { ResourceControlType } from '@/react/portainer/access-control/types'; import { AccessControlFormData } from 'Portainer/components/accessControlForm/porAccessControlFormModel'; import { FeatureId } from 'Portainer/feature-flags/enums'; -import { getEnvironments } from '@/portainer/environments/environment.service'; +import { getEnvironments } from '@/react/portainer/environments/environment.service'; import { StackStatus, StackType } from '@/react/docker/stacks/types'; angular.module('portainer.app').controller('StackController', [ diff --git a/app/react-tools/test-mocks.ts b/app/react-tools/test-mocks.ts index 59e8fddb3..115a08bed 100644 --- a/app/react-tools/test-mocks.ts +++ b/app/react-tools/test-mocks.ts @@ -2,7 +2,7 @@ import _ from 'lodash'; import { Team } from '@/react/portainer/users/teams/types'; import { Role, User, UserId } from '@/portainer/users/types'; -import { Environment } from '@/portainer/environments/types'; +import { Environment } from '@/react/portainer/environments/types'; export function createMockUsers( count: number, diff --git a/app/react/azure/container-instances/CreateView/useCreateInstanceMutation.tsx b/app/react/azure/container-instances/CreateView/useCreateInstanceMutation.tsx index 040508019..db8029f77 100644 --- a/app/react/azure/container-instances/CreateView/useCreateInstanceMutation.tsx +++ b/app/react/azure/container-instances/CreateView/useCreateInstanceMutation.tsx @@ -2,7 +2,7 @@ import { useMutation, useQueryClient } from 'react-query'; import { createContainerGroup } from '@/react/azure/services/container-groups.service'; import { queryKeys } from '@/react/azure/queries/query-keys'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import PortainerError from '@/portainer/error'; import { ContainerGroup, diff --git a/app/react/azure/container-instances/CreateView/useLoadFormState.ts b/app/react/azure/container-instances/CreateView/useLoadFormState.ts index 4214271e8..416944433 100644 --- a/app/react/azure/container-instances/CreateView/useLoadFormState.ts +++ b/app/react/azure/container-instances/CreateView/useLoadFormState.ts @@ -1,4 +1,4 @@ -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { ContainerInstanceFormValues, ProviderViewModel, diff --git a/app/react/azure/container-instances/ListView/ListView.tsx b/app/react/azure/container-instances/ListView/ListView.tsx index 8fbe4e4cf..3698ffda3 100644 --- a/app/react/azure/container-instances/ListView/ListView.tsx +++ b/app/react/azure/container-instances/ListView/ListView.tsx @@ -3,7 +3,7 @@ import { useMutation, useQueryClient } from 'react-query'; import { deleteContainerGroup } from '@/react/azure/services/container-groups.service'; import { useEnvironmentId } from '@/portainer/hooks/useEnvironmentId'; import { notifyError, notifySuccess } from '@/portainer/services/notifications'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { promiseSequence } from '@/portainer/helpers/promise-utils'; import { useContainerGroups } from '@/react/azure/queries/useContainerGroups'; import { useSubscriptions } from '@/react/azure/queries/useSubscriptions'; diff --git a/app/react/azure/queries/query-keys.ts b/app/react/azure/queries/query-keys.ts index 06a754c90..bd5288078 100644 --- a/app/react/azure/queries/query-keys.ts +++ b/app/react/azure/queries/query-keys.ts @@ -1,4 +1,4 @@ -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; export const queryKeys = { subscriptions: (environmentId: EnvironmentId) => diff --git a/app/react/azure/queries/useContainerGroup.ts b/app/react/azure/queries/useContainerGroup.ts index 1e3ad2656..8baedb37e 100644 --- a/app/react/azure/queries/useContainerGroup.ts +++ b/app/react/azure/queries/useContainerGroup.ts @@ -1,6 +1,6 @@ import { useQuery } from 'react-query'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { withError } from '@/react-tools/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/azure/queries/useContainerGroups.ts b/app/react/azure/queries/useContainerGroups.ts index 16c7f4a2f..80a02806d 100644 --- a/app/react/azure/queries/useContainerGroups.ts +++ b/app/react/azure/queries/useContainerGroups.ts @@ -4,7 +4,7 @@ import { useQueries } from 'react-query'; import { withError } from '@/react-tools/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { Subscription, ContainerGroup } from '../types'; diff --git a/app/react/azure/queries/useProvider.ts b/app/react/azure/queries/useProvider.ts index 1b1e5bd23..497a2910d 100644 --- a/app/react/azure/queries/useProvider.ts +++ b/app/react/azure/queries/useProvider.ts @@ -1,7 +1,7 @@ import _ from 'lodash'; import { useQueries } from 'react-query'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { withError } from '@/react-tools/react-query'; diff --git a/app/react/azure/queries/useResourceGroup.ts b/app/react/azure/queries/useResourceGroup.ts index 07a307c0d..0a7e0eba9 100644 --- a/app/react/azure/queries/useResourceGroup.ts +++ b/app/react/azure/queries/useResourceGroup.ts @@ -1,6 +1,6 @@ import { useQuery } from 'react-query'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { withError } from '@/react-tools/react-query'; diff --git a/app/react/azure/queries/useResourceGroups.ts b/app/react/azure/queries/useResourceGroups.ts index e49de14a4..33832e628 100644 --- a/app/react/azure/queries/useResourceGroups.ts +++ b/app/react/azure/queries/useResourceGroups.ts @@ -1,7 +1,7 @@ import _ from 'lodash'; import { useQueries } from 'react-query'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { withError } from '@/react-tools/react-query'; diff --git a/app/react/azure/queries/useSubscription.ts b/app/react/azure/queries/useSubscription.ts index 7e0148e9a..5cfe9cb0c 100644 --- a/app/react/azure/queries/useSubscription.ts +++ b/app/react/azure/queries/useSubscription.ts @@ -1,6 +1,6 @@ import { useQuery } from 'react-query'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { withError } from '@/react-tools/react-query'; diff --git a/app/react/azure/queries/useSubscriptions.ts b/app/react/azure/queries/useSubscriptions.ts index bb2b32cde..e5fbb587d 100644 --- a/app/react/azure/queries/useSubscriptions.ts +++ b/app/react/azure/queries/useSubscriptions.ts @@ -1,7 +1,7 @@ import { useQuery } from 'react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { withError } from '@/react-tools/react-query'; import { azureErrorParser } from '../services/utils'; diff --git a/app/react/azure/queries/utils.ts b/app/react/azure/queries/utils.ts index 599ae7c8f..c16495d95 100644 --- a/app/react/azure/queries/utils.ts +++ b/app/react/azure/queries/utils.ts @@ -1,4 +1,4 @@ -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; export function buildSubscriptionsUrl( environmentId: EnvironmentId, diff --git a/app/react/azure/services/container-groups.service.ts b/app/react/azure/services/container-groups.service.ts index 38c095230..a95ff480b 100644 --- a/app/react/azure/services/container-groups.service.ts +++ b/app/react/azure/services/container-groups.service.ts @@ -1,4 +1,4 @@ -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { buildContainerGroupUrl } from '../queries/utils'; diff --git a/app/react/docker/containers/ListView/ContainersDatatable/ContainersDatatable.tsx b/app/react/docker/containers/ListView/ContainersDatatable/ContainersDatatable.tsx index ec9b5398f..029dffff2 100644 --- a/app/react/docker/containers/ListView/ContainersDatatable/ContainersDatatable.tsx +++ b/app/react/docker/containers/ListView/ContainersDatatable/ContainersDatatable.tsx @@ -1,6 +1,6 @@ import _ from 'lodash'; -import { Environment } from '@/portainer/environments/types'; +import { Environment } from '@/react/portainer/environments/types'; import type { DockerContainer } from '@/react/docker/containers/types'; import { useShowGPUsColumn } from '@/react/docker/containers/utils'; diff --git a/app/react/docker/containers/ListView/ContainersDatatable/ContainersDatatableActions.tsx b/app/react/docker/containers/ListView/ContainersDatatable/ContainersDatatableActions.tsx index ce59e7cf2..c23dd8078 100644 --- a/app/react/docker/containers/ListView/ContainersDatatable/ContainersDatatableActions.tsx +++ b/app/react/docker/containers/ListView/ContainersDatatable/ContainersDatatableActions.tsx @@ -27,7 +27,7 @@ import { startContainer, stopContainer, } from '@/react/docker/containers/containers.service'; -import type { EnvironmentId } from '@/portainer/environments/types'; +import type { EnvironmentId } from '@/react/portainer/environments/types'; import { Link } from '@@/Link'; import { ButtonGroup, Button } from '@@/buttons'; diff --git a/app/react/docker/containers/ListView/ContainersDatatable/RowContext.ts b/app/react/docker/containers/ListView/ContainersDatatable/RowContext.ts index c75f3e3e8..66af35873 100644 --- a/app/react/docker/containers/ListView/ContainersDatatable/RowContext.ts +++ b/app/react/docker/containers/ListView/ContainersDatatable/RowContext.ts @@ -1,4 +1,4 @@ -import { Environment } from '@/portainer/environments/types'; +import { Environment } from '@/react/portainer/environments/types'; import { createRowContext } from '@@/datatables/RowContext'; diff --git a/app/react/docker/containers/ListView/ListView.tsx b/app/react/docker/containers/ListView/ListView.tsx index 77714fdd8..fbfd75c8f 100644 --- a/app/react/docker/containers/ListView/ListView.tsx +++ b/app/react/docker/containers/ListView/ListView.tsx @@ -1,6 +1,6 @@ import { useInfo } from '@/docker/services/system.service'; -import { Environment } from '@/portainer/environments/types'; -import { isAgentEnvironment } from '@/portainer/environments/utils'; +import { Environment } from '@/react/portainer/environments/types'; +import { isAgentEnvironment } from '@/react/portainer/environments/utils'; import { PageHeader } from '@@/PageHeader'; diff --git a/app/react/docker/containers/containers.service.ts b/app/react/docker/containers/containers.service.ts index 1d546b6fe..9ad68b7ae 100644 --- a/app/react/docker/containers/containers.service.ts +++ b/app/react/docker/containers/containers.service.ts @@ -1,4 +1,4 @@ -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import PortainerError from '@/portainer/error'; import axios from '@/portainer/services/axios'; import { genericHandler } from '@/docker/rest/response/handlers'; diff --git a/app/react/docker/containers/queries/containers.ts b/app/react/docker/containers/queries/containers.ts index cabfb7a3c..5aa511879 100644 --- a/app/react/docker/containers/queries/containers.ts +++ b/app/react/docker/containers/queries/containers.ts @@ -1,6 +1,6 @@ import { useQuery } from 'react-query'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { urlBuilder } from '../containers.service'; diff --git a/app/react/docker/containers/queries/gpus.tsx b/app/react/docker/containers/queries/gpus.tsx index 42bf512ee..8b4a513ab 100644 --- a/app/react/docker/containers/queries/gpus.tsx +++ b/app/react/docker/containers/queries/gpus.tsx @@ -1,6 +1,6 @@ import { useQuery } from 'react-query'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { queryKeys } from './query-keys'; diff --git a/app/react/docker/containers/queries/query-keys.ts b/app/react/docker/containers/queries/query-keys.ts index b45daf4c7..38026e498 100644 --- a/app/react/docker/containers/queries/query-keys.ts +++ b/app/react/docker/containers/queries/query-keys.ts @@ -1,4 +1,4 @@ -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { queryKeys as dockerQueryKeys } from '../../queries/utils'; diff --git a/app/react/docker/containers/utils.ts b/app/react/docker/containers/utils.ts index 26e1a2815..a25012561 100644 --- a/app/react/docker/containers/utils.ts +++ b/app/react/docker/containers/utils.ts @@ -1,7 +1,7 @@ import _ from 'lodash'; import { useInfo } from '@/docker/services/system.service'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { ResourceControlViewModel } from '@/react/portainer/access-control/models/ResourceControlViewModel'; import { DockerContainer, ContainerStatus } from './types'; diff --git a/app/react/docker/networks/ItemView/NetworkContainersTable.tsx b/app/react/docker/networks/ItemView/NetworkContainersTable.tsx index f38eea64e..01e22b822 100644 --- a/app/react/docker/networks/ItemView/NetworkContainersTable.tsx +++ b/app/react/docker/networks/ItemView/NetworkContainersTable.tsx @@ -1,5 +1,5 @@ import { Authorized } from '@/portainer/hooks/useUser'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { Icon } from '@/react/components/Icon'; import { Table, TableContainer, TableTitle } from '@@/datatables'; diff --git a/app/react/docker/networks/network.service.ts b/app/react/docker/networks/network.service.ts index a1b53645c..a75cc68b2 100644 --- a/app/react/docker/networks/network.service.ts +++ b/app/react/docker/networks/network.service.ts @@ -1,6 +1,6 @@ import { ContainerId } from '@/react/docker/containers/types'; import axios, { parseAxiosError } from '@/portainer/services/axios'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { NetworkId, DockerNetwork } from './types'; diff --git a/app/react/docker/networks/queries.ts b/app/react/docker/networks/queries.ts index d9b11e29f..dbfee1d2c 100644 --- a/app/react/docker/networks/queries.ts +++ b/app/react/docker/networks/queries.ts @@ -1,6 +1,6 @@ import { useQuery, useMutation, useQueryClient } from 'react-query'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { error as notifyError, success as notifySuccess, diff --git a/app/react/docker/queries/utils.ts b/app/react/docker/queries/utils.ts index 1d2b56fec..3f29e8ae7 100644 --- a/app/react/docker/queries/utils.ts +++ b/app/react/docker/queries/utils.ts @@ -1,4 +1,4 @@ -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; export const queryKeys = { root: (environmentId: EnvironmentId) => ['docker', environmentId] as const, diff --git a/app/react/docker/stacks/ItemView/StackContainersDatatable.tsx b/app/react/docker/stacks/ItemView/StackContainersDatatable.tsx index 0bfc4b304..fa098e26d 100644 --- a/app/react/docker/stacks/ItemView/StackContainersDatatable.tsx +++ b/app/react/docker/stacks/ItemView/StackContainersDatatable.tsx @@ -1,7 +1,7 @@ import _ from 'lodash'; import { DockerContainer } from '@/react/docker/containers/types'; -import { Environment } from '@/portainer/environments/types'; +import { Environment } from '@/react/portainer/environments/types'; import { createStore } from '@/react/docker/containers/ListView/ContainersDatatable/datatable-store'; import { useColumns } from '@/react/docker/containers/ListView/ContainersDatatable/columns'; import { ContainersDatatableActions } from '@/react/docker/containers/ListView/ContainersDatatable/ContainersDatatableActions'; diff --git a/app/react/edge/components/EdgeScriptForm/ScriptTabs.tsx b/app/react/edge/components/EdgeScriptForm/ScriptTabs.tsx index d1a864acd..c84875285 100644 --- a/app/react/edge/components/EdgeScriptForm/ScriptTabs.tsx +++ b/app/react/edge/components/EdgeScriptForm/ScriptTabs.tsx @@ -1,6 +1,6 @@ import { useEffect } from 'react'; -import { useAgentDetails } from '@/portainer/environments/queries/useAgentDetails'; +import { useAgentDetails } from '@/react/portainer/environments/queries/useAgentDetails'; import { Code } from '@@/Code'; import { CopyButton } from '@@/buttons/CopyButton'; diff --git a/app/react/edge/edge-groups/types.ts b/app/react/edge/edge-groups/types.ts index d08cb3282..c60778ea7 100644 --- a/app/react/edge/edge-groups/types.ts +++ b/app/react/edge/edge-groups/types.ts @@ -1,4 +1,4 @@ -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { TagId } from '@/portainer/tags/types'; export interface EdgeGroup { diff --git a/app/react/kubernetes/cluster/ingressClass/IngressClassDatatable/RowContext.tsx b/app/react/kubernetes/cluster/ingressClass/IngressClassDatatable/RowContext.tsx index c75f3e3e8..66af35873 100644 --- a/app/react/kubernetes/cluster/ingressClass/IngressClassDatatable/RowContext.tsx +++ b/app/react/kubernetes/cluster/ingressClass/IngressClassDatatable/RowContext.tsx @@ -1,4 +1,4 @@ -import { Environment } from '@/portainer/environments/types'; +import { Environment } from '@/react/portainer/environments/types'; import { createRowContext } from '@@/datatables/RowContext'; diff --git a/app/react/kubernetes/cluster/ingressClass/ingressClass.service.ts b/app/react/kubernetes/cluster/ingressClass/ingressClass.service.ts index 50ebeb606..dc1d5e6bb 100644 --- a/app/react/kubernetes/cluster/ingressClass/ingressClass.service.ts +++ b/app/react/kubernetes/cluster/ingressClass/ingressClass.service.ts @@ -1,5 +1,5 @@ import axios, { parseAxiosError } from '@/portainer/services/axios'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { KubernetesApiListResponse, V1IngressClass, diff --git a/app/react/kubernetes/cluster/ingressClass/utils/index.ts b/app/react/kubernetes/cluster/ingressClass/utils/index.ts index 8b462a37c..6f5949222 100644 --- a/app/react/kubernetes/cluster/ingressClass/utils/index.ts +++ b/app/react/kubernetes/cluster/ingressClass/utils/index.ts @@ -1,4 +1,4 @@ -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import PortainerError from '@/portainer/error'; import axios from '@/portainer/services/axios'; diff --git a/app/react/kubernetes/configs/queries.ts b/app/react/kubernetes/configs/queries.ts index e45253366..ad6cb4ef2 100644 --- a/app/react/kubernetes/configs/queries.ts +++ b/app/react/kubernetes/configs/queries.ts @@ -1,6 +1,6 @@ import { useQuery } from 'react-query'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { error as notifyError } from '@/portainer/services/notifications'; import { getConfigMaps } from './service'; diff --git a/app/react/kubernetes/configs/service.ts b/app/react/kubernetes/configs/service.ts index 7ebc55ced..cd3a4c6b6 100644 --- a/app/react/kubernetes/configs/service.ts +++ b/app/react/kubernetes/configs/service.ts @@ -1,5 +1,5 @@ import axios, { parseAxiosError } from '@/portainer/services/axios'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { Configuration } from './types'; diff --git a/app/react/kubernetes/namespaces/CreateView/CreateNamespaceRegistriesSelector.tsx b/app/react/kubernetes/namespaces/CreateView/CreateNamespaceRegistriesSelector.tsx index 88d41847a..423d37de7 100644 --- a/app/react/kubernetes/namespaces/CreateView/CreateNamespaceRegistriesSelector.tsx +++ b/app/react/kubernetes/namespaces/CreateView/CreateNamespaceRegistriesSelector.tsx @@ -1,4 +1,4 @@ -import { Registry } from '@/portainer/environments/environment.service/registries'; +import { Registry } from '@/react/portainer/environments/environment.service/registries'; import { Select } from '@@/form-components/ReactSelect'; diff --git a/app/react/kubernetes/namespaces/queries.ts b/app/react/kubernetes/namespaces/queries.ts index 13657f4ea..00d1b65cd 100644 --- a/app/react/kubernetes/namespaces/queries.ts +++ b/app/react/kubernetes/namespaces/queries.ts @@ -1,6 +1,6 @@ import { useQuery } from 'react-query'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { error as notifyError } from '@/portainer/services/notifications'; import { getNamespaces, getNamespace } from './service'; diff --git a/app/react/kubernetes/namespaces/service.ts b/app/react/kubernetes/namespaces/service.ts index 74cd14e0d..43612d62e 100644 --- a/app/react/kubernetes/namespaces/service.ts +++ b/app/react/kubernetes/namespaces/service.ts @@ -1,5 +1,5 @@ import axios, { parseAxiosError } from '@/portainer/services/axios'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { Namespaces } from './types'; diff --git a/app/react/portainer/access-control/AccessControlPanel/AccessControlPanel.tsx b/app/react/portainer/access-control/AccessControlPanel/AccessControlPanel.tsx index 93fab6cff..3742dd426 100644 --- a/app/react/portainer/access-control/AccessControlPanel/AccessControlPanel.tsx +++ b/app/react/portainer/access-control/AccessControlPanel/AccessControlPanel.tsx @@ -4,7 +4,7 @@ import { useUser } from '@/portainer/hooks/useUser'; import { Icon } from '@/react/components/Icon'; import { TeamMembership, TeamRole } from '@/react/portainer/users/teams/types'; import { useUserMembership } from '@/portainer/users/queries'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { TableContainer, TableTitle } from '@@/datatables'; import { Button } from '@@/buttons'; diff --git a/app/react/portainer/access-control/AccessControlPanel/AccessControlPanelForm.tsx b/app/react/portainer/access-control/AccessControlPanel/AccessControlPanelForm.tsx index 78068c89e..de6b64af4 100644 --- a/app/react/portainer/access-control/AccessControlPanel/AccessControlPanelForm.tsx +++ b/app/react/portainer/access-control/AccessControlPanel/AccessControlPanelForm.tsx @@ -6,7 +6,7 @@ import { object } from 'yup'; import { useUser } from '@/portainer/hooks/useUser'; import { confirmAsync } from '@/portainer/services/modal.service/confirm'; import { notifySuccess } from '@/portainer/services/notifications'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { Button } from '@@/buttons'; import { LoadingButton } from '@@/buttons/LoadingButton'; diff --git a/app/react/portainer/access-control/EditDetails/EditDetails.tsx b/app/react/portainer/access-control/EditDetails/EditDetails.tsx index 157f8e3f3..18fb4d3a1 100644 --- a/app/react/portainer/access-control/EditDetails/EditDetails.tsx +++ b/app/react/portainer/access-control/EditDetails/EditDetails.tsx @@ -2,7 +2,7 @@ import { useCallback } from 'react'; import { FormikErrors } from 'formik'; import { useUser } from '@/portainer/hooks/useUser'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { BoxSelector } from '@@/BoxSelector'; import { FormError } from '@@/form-components/FormError'; diff --git a/app/react/portainer/access-control/EditDetails/useLoadState.ts b/app/react/portainer/access-control/EditDetails/useLoadState.ts index ce44aa385..18904d7d9 100644 --- a/app/react/portainer/access-control/EditDetails/useLoadState.ts +++ b/app/react/portainer/access-control/EditDetails/useLoadState.ts @@ -1,6 +1,6 @@ import { useTeams } from '@/react/portainer/users/teams/queries'; import { useUsers } from '@/portainer/users/queries'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; export function useLoadState(environmentId?: EnvironmentId) { const teams = useTeams(false, environmentId); diff --git a/app/portainer/environments/environment.service/create.ts b/app/react/portainer/environments/environment.service/create.ts similarity index 100% rename from app/portainer/environments/environment.service/create.ts rename to app/react/portainer/environments/environment.service/create.ts diff --git a/app/portainer/environments/environment.service/edge.ts b/app/react/portainer/environments/environment.service/edge.ts similarity index 100% rename from app/portainer/environments/environment.service/edge.ts rename to app/react/portainer/environments/environment.service/edge.ts diff --git a/app/portainer/environments/environment.service/index.ts b/app/react/portainer/environments/environment.service/index.ts similarity index 100% rename from app/portainer/environments/environment.service/index.ts rename to app/react/portainer/environments/environment.service/index.ts diff --git a/app/portainer/environments/environment.service/registries.ts b/app/react/portainer/environments/environment.service/registries.ts similarity index 100% rename from app/portainer/environments/environment.service/registries.ts rename to app/react/portainer/environments/environment.service/registries.ts diff --git a/app/portainer/environments/environment.service/utils.ts b/app/react/portainer/environments/environment.service/utils.ts similarity index 100% rename from app/portainer/environments/environment.service/utils.ts rename to app/react/portainer/environments/environment.service/utils.ts diff --git a/app/portainer/environments/queries/useAgentDetails.ts b/app/react/portainer/environments/queries/useAgentDetails.ts similarity index 100% rename from app/portainer/environments/queries/useAgentDetails.ts rename to app/react/portainer/environments/queries/useAgentDetails.ts diff --git a/app/portainer/environments/queries/useAgentVersionsList.ts b/app/react/portainer/environments/queries/useAgentVersionsList.ts similarity index 100% rename from app/portainer/environments/queries/useAgentVersionsList.ts rename to app/react/portainer/environments/queries/useAgentVersionsList.ts diff --git a/app/portainer/environments/queries/useCreateEnvironmentMutation.ts b/app/react/portainer/environments/queries/useCreateEnvironmentMutation.ts similarity index 100% rename from app/portainer/environments/queries/useCreateEnvironmentMutation.ts rename to app/react/portainer/environments/queries/useCreateEnvironmentMutation.ts diff --git a/app/portainer/environments/queries/useEnvironment.ts b/app/react/portainer/environments/queries/useEnvironment.ts similarity index 68% rename from app/portainer/environments/queries/useEnvironment.ts rename to app/react/portainer/environments/queries/useEnvironment.ts index 80610ac2f..63f98e031 100644 --- a/app/portainer/environments/queries/useEnvironment.ts +++ b/app/react/portainer/environments/queries/useEnvironment.ts @@ -1,7 +1,7 @@ import { useQuery } from 'react-query'; -import { getEndpoint } from '@/portainer/environments/environment.service'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { getEndpoint } from '@/react/portainer/environments/environment.service'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { withError } from '@/react-tools/react-query'; export function useEnvironment(id?: EnvironmentId) { diff --git a/app/portainer/environments/queries/useEnvironmentList.ts b/app/react/portainer/environments/queries/useEnvironmentList.ts similarity index 100% rename from app/portainer/environments/queries/useEnvironmentList.ts rename to app/react/portainer/environments/queries/useEnvironmentList.ts diff --git a/app/portainer/environments/types.ts b/app/react/portainer/environments/types.ts similarity index 100% rename from app/portainer/environments/types.ts rename to app/react/portainer/environments/types.ts diff --git a/app/react/portainer/environments/update-schedules/common/ActiveSchedulesNotice.tsx b/app/react/portainer/environments/update-schedules/common/ActiveSchedulesNotice.tsx index 113394f65..62e2af464 100644 --- a/app/react/portainer/environments/update-schedules/common/ActiveSchedulesNotice.tsx +++ b/app/react/portainer/environments/update-schedules/common/ActiveSchedulesNotice.tsx @@ -1,7 +1,7 @@ import _ from 'lodash'; import { Clock } from 'react-feather'; -import { Environment } from '@/portainer/environments/types'; +import { Environment } from '@/react/portainer/environments/types'; import { useEdgeGroups } from '@/react/edge/edge-groups/queries/useEdgeGroups'; import { EdgeGroup } from '@/react/edge/edge-groups/types'; diff --git a/app/react/portainer/environments/update-schedules/common/EnvironmentSelection.tsx b/app/react/portainer/environments/update-schedules/common/EnvironmentSelection.tsx index 9cd313048..e08cae128 100644 --- a/app/react/portainer/environments/update-schedules/common/EnvironmentSelection.tsx +++ b/app/react/portainer/environments/update-schedules/common/EnvironmentSelection.tsx @@ -1,6 +1,6 @@ import _ from 'lodash'; -import { Environment } from '@/portainer/environments/types'; +import { Environment } from '@/react/portainer/environments/types'; import { TextTip } from '@@/Tip/TextTip'; diff --git a/app/react/portainer/environments/update-schedules/common/EnvironmentSelectionItem.tsx b/app/react/portainer/environments/update-schedules/common/EnvironmentSelectionItem.tsx index 1573eda8d..0d80f1a28 100644 --- a/app/react/portainer/environments/update-schedules/common/EnvironmentSelectionItem.tsx +++ b/app/react/portainer/environments/update-schedules/common/EnvironmentSelectionItem.tsx @@ -2,7 +2,7 @@ import { useField } from 'formik'; import _ from 'lodash'; import { useState, ChangeEvent } from 'react'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { Select } from '@@/form-components/Input'; import { Checkbox } from '@@/form-components/Checkbox'; diff --git a/app/react/portainer/environments/update-schedules/common/UpdateScheduleDetailsFieldset.tsx b/app/react/portainer/environments/update-schedules/common/UpdateScheduleDetailsFieldset.tsx index e3581b6ab..72d760775 100644 --- a/app/react/portainer/environments/update-schedules/common/UpdateScheduleDetailsFieldset.tsx +++ b/app/react/portainer/environments/update-schedules/common/UpdateScheduleDetailsFieldset.tsx @@ -1,8 +1,8 @@ import { useFormikContext } from 'formik'; import { useCurrentStateAndParams } from '@uirouter/react'; -import { EdgeTypes, EnvironmentId } from '@/portainer/environments/types'; -import { useEnvironmentList } from '@/portainer/environments/queries/useEnvironmentList'; +import { EdgeTypes, EnvironmentId } from '@/react/portainer/environments/types'; +import { useEnvironmentList } from '@/react/portainer/environments/queries/useEnvironmentList'; import { useActiveSchedules } from '../queries/useActiveSchedules'; diff --git a/app/react/portainer/environments/update-schedules/common/types.ts b/app/react/portainer/environments/update-schedules/common/types.ts index 8cff1e558..30a8e9422 100644 --- a/app/react/portainer/environments/update-schedules/common/types.ts +++ b/app/react/portainer/environments/update-schedules/common/types.ts @@ -1,4 +1,4 @@ -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { EdgeGroup } from '@/react/edge/edge-groups/types'; import { ScheduleType } from '../types'; diff --git a/app/react/portainer/environments/update-schedules/queries/query-keys.ts b/app/react/portainer/environments/update-schedules/queries/query-keys.ts index 6e6628660..345b2bc87 100644 --- a/app/react/portainer/environments/update-schedules/queries/query-keys.ts +++ b/app/react/portainer/environments/update-schedules/queries/query-keys.ts @@ -1,4 +1,4 @@ -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { EdgeUpdateSchedule } from '../types'; diff --git a/app/react/portainer/environments/update-schedules/queries/useActiveSchedules.ts b/app/react/portainer/environments/update-schedules/queries/useActiveSchedules.ts index e5189860b..5e781f129 100644 --- a/app/react/portainer/environments/update-schedules/queries/useActiveSchedules.ts +++ b/app/react/portainer/environments/update-schedules/queries/useActiveSchedules.ts @@ -1,7 +1,7 @@ import { useQuery } from 'react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { EdgeUpdateSchedule, ScheduleType, StatusType } from '../types'; diff --git a/app/react/portainer/environments/update-schedules/queries/usePreviousVersions.ts b/app/react/portainer/environments/update-schedules/queries/usePreviousVersions.ts index d3c237e30..87029d749 100644 --- a/app/react/portainer/environments/update-schedules/queries/usePreviousVersions.ts +++ b/app/react/portainer/environments/update-schedules/queries/usePreviousVersions.ts @@ -1,7 +1,7 @@ import { useQuery } from 'react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { queryKeys } from './query-keys'; import { buildUrl } from './urls'; diff --git a/app/react/portainer/environments/update-schedules/types.ts b/app/react/portainer/environments/update-schedules/types.ts index d78a076e5..3d1606dc4 100644 --- a/app/react/portainer/environments/update-schedules/types.ts +++ b/app/react/portainer/environments/update-schedules/types.ts @@ -1,4 +1,4 @@ -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { UserId } from '@/portainer/users/types'; import { EdgeGroup } from '@/react/edge/edge-groups/types'; diff --git a/app/react/portainer/environments/utils/get-platform-icon.ts b/app/react/portainer/environments/utils/get-platform-icon.ts index f4c3227b3..c26231a05 100644 --- a/app/react/portainer/environments/utils/get-platform-icon.ts +++ b/app/react/portainer/environments/utils/get-platform-icon.ts @@ -1,5 +1,8 @@ -import { getPlatformType } from '@/portainer/environments/utils'; -import { EnvironmentType, PlatformType } from '@/portainer/environments/types'; +import { getPlatformType } from '@/react/portainer/environments/utils'; +import { + EnvironmentType, + PlatformType, +} from '@/react/portainer/environments/types'; import Docker from './docker.svg?c'; import Azure from './azure.svg?c'; diff --git a/app/portainer/environments/utils.ts b/app/react/portainer/environments/utils/index.ts similarity index 96% rename from app/portainer/environments/utils.ts rename to app/react/portainer/environments/utils/index.ts index 66bc2afe5..97d967bd6 100644 --- a/app/portainer/environments/utils.ts +++ b/app/react/portainer/environments/utils/index.ts @@ -1,4 +1,4 @@ -import { Environment, EnvironmentType, PlatformType } from './types'; +import { Environment, EnvironmentType, PlatformType } from '../types'; export function getPlatformType(envType: EnvironmentType) { switch (envType) { diff --git a/app/react/portainer/environments/wizard/EnvironmentsCreationView/EnvironmentsCreationView.tsx b/app/react/portainer/environments/wizard/EnvironmentsCreationView/EnvironmentsCreationView.tsx index a7c55504a..069c4b11d 100644 --- a/app/react/portainer/environments/wizard/EnvironmentsCreationView/EnvironmentsCreationView.tsx +++ b/app/react/portainer/environments/wizard/EnvironmentsCreationView/EnvironmentsCreationView.tsx @@ -4,7 +4,10 @@ import _ from 'lodash'; import clsx from 'clsx'; import { notifyError } from '@/portainer/services/notifications'; -import { Environment, EnvironmentId } from '@/portainer/environments/types'; +import { + Environment, + EnvironmentId, +} from '@/react/portainer/environments/types'; import { useAnalytics } from '@/angulartics.matomo/analytics-services'; import { Stepper } from '@@/Stepper'; diff --git a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardAzure/WizardAzure.tsx b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardAzure/WizardAzure.tsx index 16cba1141..d2922ac9c 100644 --- a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardAzure/WizardAzure.tsx +++ b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardAzure/WizardAzure.tsx @@ -3,10 +3,10 @@ import { useReducer, useState } from 'react'; import { object, SchemaOf, string } from 'yup'; import { buildOption } from '@/portainer/components/BoxSelector'; -import { useCreateAzureEnvironmentMutation } from '@/portainer/environments/queries/useCreateEnvironmentMutation'; +import { useCreateAzureEnvironmentMutation } from '@/react/portainer/environments/queries/useCreateEnvironmentMutation'; import { notifySuccess } from '@/portainer/services/notifications'; -import { Environment } from '@/portainer/environments/types'; -import { EnvironmentMetadata } from '@/portainer/environments/environment.service/create'; +import { Environment } from '@/react/portainer/environments/types'; +import { EnvironmentMetadata } from '@/react/portainer/environments/environment.service/create'; import { LoadingButton } from '@@/buttons/LoadingButton'; import { Input } from '@@/form-components/Input'; diff --git a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/APITab/APIForm.tsx b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/APITab/APIForm.tsx index f595856cc..66a42d1c0 100644 --- a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/APITab/APIForm.tsx +++ b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/APITab/APIForm.tsx @@ -1,13 +1,13 @@ import { Field, Form, Formik } from 'formik'; import { useReducer } from 'react'; -import { useCreateRemoteEnvironmentMutation } from '@/portainer/environments/queries/useCreateEnvironmentMutation'; +import { useCreateRemoteEnvironmentMutation } from '@/react/portainer/environments/queries/useCreateEnvironmentMutation'; import { Hardware } from '@/react/portainer/environments/wizard/EnvironmentsCreationView/shared/Hardware/Hardware'; import { notifySuccess } from '@/portainer/services/notifications'; import { Environment, EnvironmentCreationTypes, -} from '@/portainer/environments/types'; +} from '@/react/portainer/environments/types'; import { LoadingButton } from '@@/buttons/LoadingButton'; import { FormControl } from '@@/form-components/FormControl'; diff --git a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/APITab/APITab.tsx b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/APITab/APITab.tsx index ee50dcd4b..3b39cd44d 100644 --- a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/APITab/APITab.tsx +++ b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/APITab/APITab.tsx @@ -1,4 +1,4 @@ -import { Environment } from '@/portainer/environments/types'; +import { Environment } from '@/react/portainer/environments/types'; import { APIForm } from './APIForm'; diff --git a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/APITab/DeploymentScripts.tsx b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/APITab/DeploymentScripts.tsx index 39976ecbc..5da59bcf4 100644 --- a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/APITab/DeploymentScripts.tsx +++ b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/APITab/DeploymentScripts.tsx @@ -1,6 +1,6 @@ import { useState } from 'react'; -import { useAgentDetails } from '@/portainer/environments/queries/useAgentDetails'; +import { useAgentDetails } from '@/react/portainer/environments/queries/useAgentDetails'; import { CopyButton } from '@@/buttons/CopyButton'; import { Code } from '@@/Code'; diff --git a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/APITab/types.ts b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/APITab/types.ts index 0cbdca70f..4112267d5 100644 --- a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/APITab/types.ts +++ b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/APITab/types.ts @@ -1,5 +1,5 @@ import { Gpu } from '@/react/portainer/environments/wizard/EnvironmentsCreationView/shared/Hardware/GpusList'; -import { EnvironmentMetadata } from '@/portainer/environments/environment.service/create'; +import { EnvironmentMetadata } from '@/react/portainer/environments/environment.service/create'; export interface FormValues { name: string; diff --git a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/AgentTab/AgentTab.tsx b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/AgentTab/AgentTab.tsx index c3747fa08..7e9eac9d0 100644 --- a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/AgentTab/AgentTab.tsx +++ b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/AgentTab/AgentTab.tsx @@ -1,4 +1,4 @@ -import { Environment } from '@/portainer/environments/types'; +import { Environment } from '@/react/portainer/environments/types'; import { AgentForm } from '../../shared/AgentForm/AgentForm'; diff --git a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/AgentTab/DeploymentScripts.tsx b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/AgentTab/DeploymentScripts.tsx index ac817d1b6..edb987467 100644 --- a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/AgentTab/DeploymentScripts.tsx +++ b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/AgentTab/DeploymentScripts.tsx @@ -1,6 +1,6 @@ import { useState } from 'react'; -import { useAgentDetails } from '@/portainer/environments/queries/useAgentDetails'; +import { useAgentDetails } from '@/react/portainer/environments/queries/useAgentDetails'; import { CopyButton } from '@@/buttons/CopyButton'; import { Code } from '@@/Code'; diff --git a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/SocketTab/SocketForm.tsx b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/SocketTab/SocketForm.tsx index 832fb1e09..6088717bd 100644 --- a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/SocketTab/SocketForm.tsx +++ b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/SocketTab/SocketForm.tsx @@ -1,10 +1,10 @@ import { Field, Form, Formik, useFormikContext } from 'formik'; import { useReducer } from 'react'; -import { useCreateLocalDockerEnvironmentMutation } from '@/portainer/environments/queries/useCreateEnvironmentMutation'; +import { useCreateLocalDockerEnvironmentMutation } from '@/react/portainer/environments/queries/useCreateEnvironmentMutation'; import { Hardware } from '@/react/portainer/environments/wizard/EnvironmentsCreationView/shared/Hardware/Hardware'; import { notifySuccess } from '@/portainer/services/notifications'; -import { Environment } from '@/portainer/environments/types'; +import { Environment } from '@/react/portainer/environments/types'; import { LoadingButton } from '@@/buttons/LoadingButton'; import { FormControl } from '@@/form-components/FormControl'; diff --git a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/SocketTab/SocketTab.tsx b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/SocketTab/SocketTab.tsx index d4178c39c..a93b0e253 100644 --- a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/SocketTab/SocketTab.tsx +++ b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/SocketTab/SocketTab.tsx @@ -1,4 +1,4 @@ -import { Environment } from '@/portainer/environments/types'; +import { Environment } from '@/react/portainer/environments/types'; import { DeploymentScripts } from '../APITab/DeploymentScripts'; diff --git a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/SocketTab/types.ts b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/SocketTab/types.ts index ab9cf9b6a..84622bd39 100644 --- a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/SocketTab/types.ts +++ b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/SocketTab/types.ts @@ -1,5 +1,5 @@ import { Gpu } from '@/react/portainer/environments/wizard/EnvironmentsCreationView/shared/Hardware/GpusList'; -import { EnvironmentMetadata } from '@/portainer/environments/environment.service/create'; +import { EnvironmentMetadata } from '@/react/portainer/environments/environment.service/create'; export interface FormValues { name: string; diff --git a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/WizardDocker.tsx b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/WizardDocker.tsx index 3fec1dda0..045c0e692 100644 --- a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/WizardDocker.tsx +++ b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/WizardDocker.tsx @@ -1,6 +1,6 @@ import { useState } from 'react'; -import { Environment } from '@/portainer/environments/types'; +import { Environment } from '@/react/portainer/environments/types'; import { commandsTabs } from '@/react/edge/components/EdgeScriptForm/scripts'; import { BoxSelector, type BoxSelectorOption } from '@@/BoxSelector'; diff --git a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardEndpointsList/WizardEndpointsList.tsx b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardEndpointsList/WizardEndpointsList.tsx index f77c68544..60d5c57bb 100644 --- a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardEndpointsList/WizardEndpointsList.tsx +++ b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardEndpointsList/WizardEndpointsList.tsx @@ -5,16 +5,16 @@ import { endpointTypeName, stripProtocol, } from '@/portainer/filters/filters'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { EdgeIndicator } from '@/portainer/home/EnvironmentList/EnvironmentItem'; import { isEdgeEnvironment, isUnassociatedEdgeEnvironment, -} from '@/portainer/environments/utils'; +} from '@/react/portainer/environments/utils'; import { ENVIRONMENTS_POLLING_INTERVAL, useEnvironmentList, -} from '@/portainer/environments/queries/useEnvironmentList'; +} from '@/react/portainer/environments/queries/useEnvironmentList'; import { Widget, WidgetBody, WidgetTitle } from '@@/Widget'; diff --git a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardKubernetes/AgentPanel.tsx b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardKubernetes/AgentPanel.tsx index dec3b9f56..24d9b6717 100644 --- a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardKubernetes/AgentPanel.tsx +++ b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardKubernetes/AgentPanel.tsx @@ -1,4 +1,4 @@ -import { Environment } from '@/portainer/environments/types'; +import { Environment } from '@/react/portainer/environments/types'; import { AgentForm } from '../shared/AgentForm'; diff --git a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardKubernetes/DeploymentScripts.tsx b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardKubernetes/DeploymentScripts.tsx index 6c88fa98f..82c8d9298 100644 --- a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardKubernetes/DeploymentScripts.tsx +++ b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardKubernetes/DeploymentScripts.tsx @@ -1,7 +1,7 @@ import { useState } from 'react'; import { getAgentShortVersion } from '@/portainer/views/endpoints/helpers'; -import { useAgentDetails } from '@/portainer/environments/queries/useAgentDetails'; +import { useAgentDetails } from '@/react/portainer/environments/queries/useAgentDetails'; import { CopyButton } from '@@/buttons/CopyButton'; import { Code } from '@@/Code'; diff --git a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardKubernetes/WizardKubernetes.tsx b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardKubernetes/WizardKubernetes.tsx index 5f18aefa5..44c0b99df 100644 --- a/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardKubernetes/WizardKubernetes.tsx +++ b/app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardKubernetes/WizardKubernetes.tsx @@ -3,7 +3,7 @@ import { useState } from 'react'; import { Environment, EnvironmentCreationTypes, -} from '@/portainer/environments/types'; +} from '@/react/portainer/environments/types'; import { commandsTabs } from '@/react/edge/components/EdgeScriptForm/scripts'; import { FeatureId } from '@/portainer/feature-flags/enums'; diff --git a/app/react/portainer/environments/wizard/EnvironmentsCreationView/shared/AgentForm/AgentForm.tsx b/app/react/portainer/environments/wizard/EnvironmentsCreationView/shared/AgentForm/AgentForm.tsx index b20b6dab7..5a9f5ff33 100644 --- a/app/react/portainer/environments/wizard/EnvironmentsCreationView/shared/AgentForm/AgentForm.tsx +++ b/app/react/portainer/environments/wizard/EnvironmentsCreationView/shared/AgentForm/AgentForm.tsx @@ -1,10 +1,10 @@ import { Form, Formik } from 'formik'; import { useReducer } from 'react'; -import { useCreateAgentEnvironmentMutation } from '@/portainer/environments/queries/useCreateEnvironmentMutation'; +import { useCreateAgentEnvironmentMutation } from '@/react/portainer/environments/queries/useCreateEnvironmentMutation'; import { notifySuccess } from '@/portainer/services/notifications'; -import { Environment } from '@/portainer/environments/types'; -import { CreateAgentEnvironmentValues } from '@/portainer/environments/environment.service/create'; +import { Environment } from '@/react/portainer/environments/types'; +import { CreateAgentEnvironmentValues } from '@/react/portainer/environments/environment.service/create'; import { LoadingButton } from '@@/buttons/LoadingButton'; import { Icon } from '@@/Icon'; diff --git a/app/react/portainer/environments/wizard/EnvironmentsCreationView/shared/AgentForm/AgentForm.validation.tsx b/app/react/portainer/environments/wizard/EnvironmentsCreationView/shared/AgentForm/AgentForm.validation.tsx index 41952e930..61ff688f9 100644 --- a/app/react/portainer/environments/wizard/EnvironmentsCreationView/shared/AgentForm/AgentForm.validation.tsx +++ b/app/react/portainer/environments/wizard/EnvironmentsCreationView/shared/AgentForm/AgentForm.validation.tsx @@ -1,7 +1,7 @@ import { object, SchemaOf, string } from 'yup'; import { gpusListValidation } from '@/react/portainer/environments/wizard/EnvironmentsCreationView/shared/Hardware/GpusList'; -import { CreateAgentEnvironmentValues } from '@/portainer/environments/environment.service/create'; +import { CreateAgentEnvironmentValues } from '@/react/portainer/environments/environment.service/create'; import { metadataValidation } from '../MetadataFieldset/validation'; import { nameValidation } from '../NameField'; diff --git a/app/react/portainer/environments/wizard/EnvironmentsCreationView/shared/EdgeAgentTab/EdgeAgentForm/EdgeAgentForm.tsx b/app/react/portainer/environments/wizard/EnvironmentsCreationView/shared/EdgeAgentTab/EdgeAgentForm/EdgeAgentForm.tsx index df8569e91..92dab95c5 100644 --- a/app/react/portainer/environments/wizard/EnvironmentsCreationView/shared/EdgeAgentTab/EdgeAgentForm/EdgeAgentForm.tsx +++ b/app/react/portainer/environments/wizard/EnvironmentsCreationView/shared/EdgeAgentTab/EdgeAgentForm/EdgeAgentForm.tsx @@ -1,7 +1,7 @@ import { Formik, Form } from 'formik'; -import { Environment } from '@/portainer/environments/types'; -import { useCreateEdgeAgentEnvironmentMutation } from '@/portainer/environments/queries/useCreateEnvironmentMutation'; +import { Environment } from '@/react/portainer/environments/types'; +import { useCreateEdgeAgentEnvironmentMutation } from '@/react/portainer/environments/queries/useCreateEnvironmentMutation'; import { baseHref } from '@/portainer/helpers/pathHelper'; import { EdgeCheckinIntervalField } from '@/edge/components/EdgeCheckInIntervalField'; import { useCreateEdgeDeviceParam } from '@/react/portainer/environments/wizard/hooks/useCreateEdgeDeviceParam'; diff --git a/app/react/portainer/environments/wizard/EnvironmentsCreationView/shared/EdgeAgentTab/EdgeAgentForm/types.ts b/app/react/portainer/environments/wizard/EnvironmentsCreationView/shared/EdgeAgentTab/EdgeAgentForm/types.ts index 3411eb23a..bdf05b59a 100644 --- a/app/react/portainer/environments/wizard/EnvironmentsCreationView/shared/EdgeAgentTab/EdgeAgentForm/types.ts +++ b/app/react/portainer/environments/wizard/EnvironmentsCreationView/shared/EdgeAgentTab/EdgeAgentForm/types.ts @@ -1,5 +1,5 @@ import { Gpu } from '@/react/portainer/environments/wizard/EnvironmentsCreationView/shared/Hardware/GpusList'; -import { EnvironmentMetadata } from '@/portainer/environments/environment.service/create'; +import { EnvironmentMetadata } from '@/react/portainer/environments/environment.service/create'; export interface FormValues { name: string; diff --git a/app/react/portainer/environments/wizard/EnvironmentsCreationView/shared/EdgeAgentTab/EdgeAgentTab.tsx b/app/react/portainer/environments/wizard/EnvironmentsCreationView/shared/EdgeAgentTab/EdgeAgentTab.tsx index 8dbafa540..118efb107 100644 --- a/app/react/portainer/environments/wizard/EnvironmentsCreationView/shared/EdgeAgentTab/EdgeAgentTab.tsx +++ b/app/react/portainer/environments/wizard/EnvironmentsCreationView/shared/EdgeAgentTab/EdgeAgentTab.tsx @@ -1,7 +1,7 @@ import { v4 as uuid } from 'uuid'; import { useReducer, useState } from 'react'; -import { Environment } from '@/portainer/environments/types'; +import { Environment } from '@/react/portainer/environments/types'; import { EdgeScriptForm } from '@/react/edge/components/EdgeScriptForm'; import { CommandTab } from '@/react/edge/components/EdgeScriptForm/scripts'; import { OS, EdgeInfo } from '@/react/edge/components/EdgeScriptForm/types'; diff --git a/app/react/portainer/environments/wizard/EnvironmentsCreationView/shared/MetadataFieldset/validation.ts b/app/react/portainer/environments/wizard/EnvironmentsCreationView/shared/MetadataFieldset/validation.ts index 2b447061b..f119c1389 100644 --- a/app/react/portainer/environments/wizard/EnvironmentsCreationView/shared/MetadataFieldset/validation.ts +++ b/app/react/portainer/environments/wizard/EnvironmentsCreationView/shared/MetadataFieldset/validation.ts @@ -1,6 +1,6 @@ import { object, number, array, SchemaOf } from 'yup'; -import { EnvironmentMetadata } from '@/portainer/environments/environment.service/create'; +import { EnvironmentMetadata } from '@/react/portainer/environments/environment.service/create'; export function metadataValidation(): SchemaOf { return object({ diff --git a/app/react/portainer/environments/wizard/EnvironmentsCreationView/shared/NameField.tsx b/app/react/portainer/environments/wizard/EnvironmentsCreationView/shared/NameField.tsx index 78fa82e36..ada0b4683 100644 --- a/app/react/portainer/environments/wizard/EnvironmentsCreationView/shared/NameField.tsx +++ b/app/react/portainer/environments/wizard/EnvironmentsCreationView/shared/NameField.tsx @@ -2,7 +2,7 @@ import { Field, useField } from 'formik'; import { string } from 'yup'; import { debounce } from 'lodash'; -import { getEnvironments } from '@/portainer/environments/environment.service'; +import { getEnvironments } from '@/react/portainer/environments/environment.service'; import { FormControl } from '@@/form-components/FormControl'; import { Input } from '@@/form-components/Input'; diff --git a/app/react/portainer/environments/wizard/EnvironmentsCreationView/useOnlyEdgeOptions.ts b/app/react/portainer/environments/wizard/EnvironmentsCreationView/useOnlyEdgeOptions.ts index e14890c1f..89ded5627 100644 --- a/app/react/portainer/environments/wizard/EnvironmentsCreationView/useOnlyEdgeOptions.ts +++ b/app/react/portainer/environments/wizard/EnvironmentsCreationView/useOnlyEdgeOptions.ts @@ -1,4 +1,4 @@ -import { EnvironmentCreationTypes } from '@/portainer/environments/types'; +import { EnvironmentCreationTypes } from '@/react/portainer/environments/types'; import { BoxSelectorOption } from '@@/BoxSelector'; diff --git a/app/react/portainer/environments/wizard/HomeView/HomeView.tsx b/app/react/portainer/environments/wizard/HomeView/HomeView.tsx index 23f61eb0f..bf5d1d2ce 100644 --- a/app/react/portainer/environments/wizard/HomeView/HomeView.tsx +++ b/app/react/portainer/environments/wizard/HomeView/HomeView.tsx @@ -1,4 +1,4 @@ -import { EnvironmentType } from '@/portainer/environments/types'; +import { EnvironmentType } from '@/react/portainer/environments/types'; import { useAnalytics } from '@/angulartics.matomo/analytics-services'; import { PageHeader } from '@@/PageHeader'; diff --git a/app/react/portainer/environments/wizard/HomeView/useFetchOrCreateLocalEnvironment.ts b/app/react/portainer/environments/wizard/HomeView/useFetchOrCreateLocalEnvironment.ts index 6088a2f94..72faf893d 100644 --- a/app/react/portainer/environments/wizard/HomeView/useFetchOrCreateLocalEnvironment.ts +++ b/app/react/portainer/environments/wizard/HomeView/useFetchOrCreateLocalEnvironment.ts @@ -1,12 +1,15 @@ import { useEffect, useState } from 'react'; import { useMutation } from 'react-query'; -import { useEnvironmentList } from '@/portainer/environments/queries/useEnvironmentList'; -import { Environment, EnvironmentType } from '@/portainer/environments/types'; +import { useEnvironmentList } from '@/react/portainer/environments/queries/useEnvironmentList'; +import { + Environment, + EnvironmentType, +} from '@/react/portainer/environments/types'; import { createLocalDockerEnvironment, createLocalKubernetesEnvironment, -} from '@/portainer/environments/environment.service/create'; +} from '@/react/portainer/environments/environment.service/create'; export function useConnectLocalEnvironment(): { status: 'error' | 'loading' | 'success'; diff --git a/app/react/portainer/settings/EdgeComputeView/AutomaticEdgeEnvCreation/AutomaticEdgeEnvCreation.tsx b/app/react/portainer/settings/EdgeComputeView/AutomaticEdgeEnvCreation/AutomaticEdgeEnvCreation.tsx index 5b1539e7c..90f7cdedc 100644 --- a/app/react/portainer/settings/EdgeComputeView/AutomaticEdgeEnvCreation/AutomaticEdgeEnvCreation.tsx +++ b/app/react/portainer/settings/EdgeComputeView/AutomaticEdgeEnvCreation/AutomaticEdgeEnvCreation.tsx @@ -1,7 +1,7 @@ import { useMutation } from 'react-query'; import { useEffect } from 'react'; -import { generateKey } from '@/portainer/environments/environment.service/edge'; +import { generateKey } from '@/react/portainer/environments/environment.service/edge'; import { EdgeScriptForm } from '@/react/edge/components/EdgeScriptForm'; import { commandsTabs } from '@/react/edge/components/EdgeScriptForm/scripts'; diff --git a/app/react/sidebar/AzureSidebar/AzureSidebar.tsx b/app/react/sidebar/AzureSidebar/AzureSidebar.tsx index 0adcec5b0..5be3335ee 100644 --- a/app/react/sidebar/AzureSidebar/AzureSidebar.tsx +++ b/app/react/sidebar/AzureSidebar/AzureSidebar.tsx @@ -1,6 +1,6 @@ import { Box } from 'react-feather'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { DashboardLink } from '../items/DashboardLink'; import { SidebarItem } from '../SidebarItem'; diff --git a/app/react/sidebar/DockerSidebar.tsx b/app/react/sidebar/DockerSidebar.tsx index ea854a711..552c4b979 100644 --- a/app/react/sidebar/DockerSidebar.tsx +++ b/app/react/sidebar/DockerSidebar.tsx @@ -15,7 +15,7 @@ import { type Environment, type EnvironmentId, EnvironmentStatus, -} from '@/portainer/environments/types'; +} from '@/react/portainer/environments/types'; import { Authorized, useUser, diff --git a/app/react/sidebar/EnvironmentSidebar.tsx b/app/react/sidebar/EnvironmentSidebar.tsx index e74fde026..86d51413e 100644 --- a/app/react/sidebar/EnvironmentSidebar.tsx +++ b/app/react/sidebar/EnvironmentSidebar.tsx @@ -8,9 +8,9 @@ import { PlatformType, EnvironmentId, Environment, -} from '@/portainer/environments/types'; -import { getPlatformType } from '@/portainer/environments/utils'; -import { useEnvironment } from '@/portainer/environments/queries/useEnvironment'; +} 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 { EndpointProvider } from '@/portainer/services/types'; diff --git a/app/react/sidebar/KubernetesSidebar/KubectlShell/KubectlShell.tsx b/app/react/sidebar/KubernetesSidebar/KubectlShell/KubectlShell.tsx index e8b7d45ed..1915bd703 100644 --- a/app/react/sidebar/KubernetesSidebar/KubectlShell/KubectlShell.tsx +++ b/app/react/sidebar/KubernetesSidebar/KubectlShell/KubectlShell.tsx @@ -8,7 +8,7 @@ import { terminalClose, terminalResize, } from '@/portainer/services/terminal-window'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { error as notifyError } from '@/portainer/services/notifications'; import { useLocalStorage } from '@/portainer/hooks/useLocalStorage'; diff --git a/app/react/sidebar/KubernetesSidebar/KubectlShell/KubectlShellButton.tsx b/app/react/sidebar/KubernetesSidebar/KubectlShell/KubectlShellButton.tsx index 8e7fc12c3..f76daf48c 100644 --- a/app/react/sidebar/KubernetesSidebar/KubectlShell/KubectlShellButton.tsx +++ b/app/react/sidebar/KubernetesSidebar/KubectlShell/KubectlShellButton.tsx @@ -2,7 +2,7 @@ import clsx from 'clsx'; import { useState } from 'react'; import { createPortal } from 'react-dom'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { useAnalytics } from '@/angulartics.matomo/analytics-services'; import { Button } from '@@/buttons'; diff --git a/app/react/sidebar/KubernetesSidebar/KubernetesSidebar.tsx b/app/react/sidebar/KubernetesSidebar/KubernetesSidebar.tsx index a2cb09f64..5ccec29ca 100644 --- a/app/react/sidebar/KubernetesSidebar/KubernetesSidebar.tsx +++ b/app/react/sidebar/KubernetesSidebar/KubernetesSidebar.tsx @@ -1,6 +1,6 @@ import { Box, Edit, Layers, Lock, Server } from 'react-feather'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { Authorized } from '@/portainer/hooks/useUser'; import Helm from '@/assets/ico/vendor/helm.svg?c'; import Route from '@/assets/ico/route.svg?c'; diff --git a/app/react/sidebar/items/DashboardLink.tsx b/app/react/sidebar/items/DashboardLink.tsx index 9e295941f..4d701ac56 100644 --- a/app/react/sidebar/items/DashboardLink.tsx +++ b/app/react/sidebar/items/DashboardLink.tsx @@ -1,6 +1,6 @@ import { Layout } from 'react-feather'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { AutomationTestingProps } from '@/types'; import { SidebarItem } from '../SidebarItem'; diff --git a/app/react/sidebar/items/VolumesLink.tsx b/app/react/sidebar/items/VolumesLink.tsx index 131ada783..c0527c2ed 100644 --- a/app/react/sidebar/items/VolumesLink.tsx +++ b/app/react/sidebar/items/VolumesLink.tsx @@ -1,6 +1,6 @@ import { Database } from 'react-feather'; -import { EnvironmentId } from '@/portainer/environments/types'; +import { EnvironmentId } from '@/react/portainer/environments/types'; import { AutomationTestingProps } from '@/types'; import { SidebarItem } from '../SidebarItem'; diff --git a/app/react/sidebar/types.ts b/app/react/sidebar/types.ts index 7cba03ceb..4fa23097a 100644 --- a/app/react/sidebar/types.ts +++ b/app/react/sidebar/types.ts @@ -1,4 +1,4 @@ -import { EnvironmentType } from '@/portainer/environments/types'; +import { EnvironmentType } from '@/react/portainer/environments/types'; type DockerSwarmMode = { provider: 'DOCKER_SWARM_MODE';