diff --git a/frontend/src/__tests__/notebookControllerUtils.spec.ts b/frontend/src/__tests__/notebookControllerUtils.spec.ts index e173b30385..b93de04082 100644 --- a/frontend/src/__tests__/notebookControllerUtils.spec.ts +++ b/frontend/src/__tests__/notebookControllerUtils.spec.ts @@ -1,4 +1,4 @@ -import { usernameTranslate } from 'utilities/notebookControllerUtils'; +import { usernameTranslate } from '~/utilities/notebookControllerUtils'; const validUnameRegex = new RegExp('^[a-z]{1}[a-z0-9-]{1,62}$'); diff --git a/frontend/src/api/network/inferenceServices.ts b/frontend/src/api/network/inferenceServices.ts index 77fed9f0ee..2fbae5a251 100644 --- a/frontend/src/api/network/inferenceServices.ts +++ b/frontend/src/api/network/inferenceServices.ts @@ -6,10 +6,10 @@ import { k8sListResource, k8sUpdateResource, } from '@openshift/dynamic-plugin-sdk-utils'; -import { InferenceServiceModel } from 'api/models'; -import { InferenceServiceKind, K8sStatus } from 'k8sTypes'; -import { CreatingInferenceServiceObject } from 'pages/modelServing/screens/types'; -import { translateDisplayNameForK8s } from 'pages/projects/utils'; +import { InferenceServiceModel } from '~/api/models'; +import { InferenceServiceKind, K8sStatus } from '~/k8sTypes'; +import { CreatingInferenceServiceObject } from '~/pages/modelServing/screens/types'; +import { translateDisplayNameForK8s } from '~/pages/projects/utils'; import { getModelServingProjects } from './projects'; const assembleInferenceService = ( diff --git a/frontend/src/api/network/notebooks.ts b/frontend/src/api/network/notebooks.ts index d2957e2382..1f9c92fcc6 100644 --- a/frontend/src/api/network/notebooks.ts +++ b/frontend/src/api/network/notebooks.ts @@ -16,7 +16,7 @@ import { ROOT_MOUNT_PATH } from '~/pages/projects/pvc/const'; import { translateDisplayNameForK8s } from '~/pages/projects/utils'; import { assemblePodSpecOptions } from './utils'; import { getTolerationPatch, TolerationChanges } from '~/utilities/tolerations'; -import { mergeK8sQueryParams } from 'api/apiMergeUtils'; +import { mergeK8sQueryParams } from '~/api/apiMergeUtils'; const assembleNotebook = (data: StartNotebookData, username: string): NotebookKind => { const { diff --git a/frontend/src/api/network/roleBindings.ts b/frontend/src/api/network/roleBindings.ts index fe0ccb4d90..fb99291ce1 100644 --- a/frontend/src/api/network/roleBindings.ts +++ b/frontend/src/api/network/roleBindings.ts @@ -1,5 +1,5 @@ import { k8sCreateResource, k8sGetResource } from '@openshift/dynamic-plugin-sdk-utils'; -import { getModelRoleBinding, getModelServiceAccountName } from 'pages/modelServing/utils'; +import { getModelRoleBinding, getModelServiceAccountName } from '~/pages/modelServing/utils'; import { RoleBindingKind } from '~/k8sTypes'; import { RoleBindingModel } from '~/api/models'; diff --git a/frontend/src/api/network/secrets.ts b/frontend/src/api/network/secrets.ts index a26a1481a2..1430b4fdf8 100644 --- a/frontend/src/api/network/secrets.ts +++ b/frontend/src/api/network/secrets.ts @@ -10,7 +10,7 @@ import { SecretModel } from '~/api/models'; import { genRandomChars } from '~/utilities/string'; import { translateDisplayNameForK8s } from '~/pages/projects/utils'; import { getModelServiceAccountName } from '~/pages/modelServing/utils'; -import { mergeK8sQueryParams } from 'api/apiMergeUtils'; +import { mergeK8sQueryParams } from '~/api/apiMergeUtils'; export const DATA_CONNECTION_PREFIX = 'aws-connection'; diff --git a/frontend/src/api/network/serviceAccounts.ts b/frontend/src/api/network/serviceAccounts.ts index e34bdfe1b9..1a9b8e9ad2 100644 --- a/frontend/src/api/network/serviceAccounts.ts +++ b/frontend/src/api/network/serviceAccounts.ts @@ -1,5 +1,5 @@ import { k8sCreateResource } from '@openshift/dynamic-plugin-sdk-utils'; -import { getModelServiceAccountName } from 'pages/modelServing/utils'; +import { getModelServiceAccountName } from '~/pages/modelServing/utils'; import { ServiceAccountModel } from '~/api/models'; import { ServiceAccountKind } from '~/k8sTypes'; diff --git a/frontend/src/api/network/servingRuntimes.ts b/frontend/src/api/network/servingRuntimes.ts index 1407a6f9d7..be764be8fb 100644 --- a/frontend/src/api/network/servingRuntimes.ts +++ b/frontend/src/api/network/servingRuntimes.ts @@ -8,13 +8,13 @@ import { } from '@openshift/dynamic-plugin-sdk-utils'; import { ServingRuntimeModel } from '~/api/models'; import { ConfigMapKind, ServingRuntimeKind } from '~/k8sTypes'; -import { CreatingServingRuntimeObject } from 'pages/modelServing/screens/types'; -import { getModelServingRuntimeName } from 'pages/modelServing/utils'; +import { CreatingServingRuntimeObject } from '~/pages/modelServing/screens/types'; +import { getModelServingRuntimeName } from '~/pages/modelServing/utils'; import { getModelServingProjects } from './projects'; import { assemblePodSpecOptions } from './utils'; import { ContainerResources } from '~/types'; -import { getDefaultServingRuntime } from 'pages/modelServing/screens/projects/utils'; -import { DEFAULT_MODEL_SERVING_TEMPLATE } from 'pages/modelServing/screens/const'; +import { getDefaultServingRuntime } from '~/pages/modelServing/screens/projects/utils'; +import { DEFAULT_MODEL_SERVING_TEMPLATE } from '~/pages/modelServing/screens/const'; const assembleServingRuntime = ( data: CreatingServingRuntimeObject, diff --git a/frontend/src/components/FormGroupSettings.tsx b/frontend/src/components/FormGroupSettings.tsx index ea420fb450..d89511a8ae 100644 --- a/frontend/src/components/FormGroupSettings.tsx +++ b/frontend/src/components/FormGroupSettings.tsx @@ -10,7 +10,7 @@ import { HintBody, } from '@patternfly/react-core'; import { MultiSelection } from './MultiSelection'; -import { GroupsConfigField, MenuItemStatus } from 'pages/groupSettings/groupTypes'; +import { GroupsConfigField, MenuItemStatus } from '~/pages/groupSettings/groupTypes'; type FormGroupSettingsProps = { title: string; diff --git a/frontend/src/components/MultiSelection.tsx b/frontend/src/components/MultiSelection.tsx index f8e3ce07be..909b821f40 100644 --- a/frontend/src/components/MultiSelection.tsx +++ b/frontend/src/components/MultiSelection.tsx @@ -6,7 +6,7 @@ import { SelectOption, SelectVariant, } from '@patternfly/react-core'; -import { MenuItemStatus } from 'pages/groupSettings/groupTypes'; +import { MenuItemStatus } from '~/pages/groupSettings/groupTypes'; type MultiSelectionProps = { value: MenuItemStatus[]; diff --git a/frontend/src/components/SupportedAppTitle.tsx b/frontend/src/components/SupportedAppTitle.tsx index aa5cbccbfb..99925b9545 100644 --- a/frontend/src/components/SupportedAppTitle.tsx +++ b/frontend/src/components/SupportedAppTitle.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { Button, CardTitle, Tooltip } from '@patternfly/react-core'; import { OdhApplication } from '~/types'; import { isRedHatSupported } from '~/utilities/utils'; -import { ODH_PRODUCT_NAME } from 'utilities/const'; +import { ODH_PRODUCT_NAME } from '~/utilities/const'; type SupportedAppTitleProps = { odhApp: OdhApplication; diff --git a/frontend/src/pages/BYONImages/BYONImagesTable.tsx b/frontend/src/pages/BYONImages/BYONImagesTable.tsx index aea3ce694c..c03d0c90d4 100644 --- a/frontend/src/pages/BYONImages/BYONImagesTable.tsx +++ b/frontend/src/pages/BYONImages/BYONImagesTable.tsx @@ -31,7 +31,7 @@ import { IAction, } from '@patternfly/react-table'; import { CubesIcon, SearchIcon } from '@patternfly/react-icons'; -import { BYONImage } from 'types'; +import { BYONImage } from '~/types'; import { ImportImageModal } from './ImportImageModal'; import { relativeTime } from '~/utilities/time'; import './BYONImagesTable.scss'; diff --git a/frontend/src/pages/BYONImages/DeleteBYONImageModal.tsx b/frontend/src/pages/BYONImages/DeleteBYONImageModal.tsx index f58dba613d..7e04735437 100644 --- a/frontend/src/pages/BYONImages/DeleteBYONImageModal.tsx +++ b/frontend/src/pages/BYONImages/DeleteBYONImageModal.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Button, Modal, ModalVariant } from '@patternfly/react-core'; import { deleteBYONImage } from '~/services/imagesService'; -import { BYONImage } from 'types'; +import { BYONImage } from '~/types'; export type ImportImageModalProps = { isOpen: boolean; image: BYONImage; diff --git a/frontend/src/pages/BYONImages/ImportImageModal.tsx b/frontend/src/pages/BYONImages/ImportImageModal.tsx index cec3139755..27929f9126 100644 --- a/frontend/src/pages/BYONImages/ImportImageModal.tsx +++ b/frontend/src/pages/BYONImages/ImportImageModal.tsx @@ -17,7 +17,7 @@ import { } from '@patternfly/react-core'; import { Caption, TableComposable, Tbody, Thead, Th, Tr } from '@patternfly/react-table'; import { importBYONImage } from '~/services/imagesService'; -import { ResponseStatus, BYONImagePackage } from 'types'; +import { ResponseStatus, BYONImagePackage } from '~/types'; import { EditStepTableRow } from './EditStepTableRow'; import { CubesIcon, ExclamationCircleIcon, PlusCircleIcon } from '@patternfly/react-icons'; import { addNotification } from '~/redux/actions/actions'; diff --git a/frontend/src/pages/BYONImages/UpdateImageModal.tsx b/frontend/src/pages/BYONImages/UpdateImageModal.tsx index dcd2d6766a..7fd5625b50 100644 --- a/frontend/src/pages/BYONImages/UpdateImageModal.tsx +++ b/frontend/src/pages/BYONImages/UpdateImageModal.tsx @@ -19,7 +19,7 @@ import { Caption, TableComposable, Tbody, Thead, Th, Tr } from '@patternfly/reac import { CubesIcon, ExclamationCircleIcon, PlusCircleIcon } from '@patternfly/react-icons'; import { updateBYONImage } from '~/services/imagesService'; import { EditStepTableRow } from './EditStepTableRow'; -import { BYONImage, BYONImagePackage } from 'types'; +import { BYONImage, BYONImagePackage } from '~/types'; import { addNotification } from '~/redux/actions/actions'; import { useAppDispatch } from '~/redux/hooks'; diff --git a/frontend/src/pages/groupSettings/GroupSettings.tsx b/frontend/src/pages/groupSettings/GroupSettings.tsx index 1df9c86651..0d4e7f85aa 100644 --- a/frontend/src/pages/groupSettings/GroupSettings.tsx +++ b/frontend/src/pages/groupSettings/GroupSettings.tsx @@ -8,10 +8,11 @@ import { } from '@patternfly/react-core'; import ApplicationsPage from '~/pages/ApplicationsPage'; import { GroupsConfigField, MenuItemStatus } from './groupTypes'; -import { useWatchGroups } from 'utilities/useWatchGroups'; -import { FormGroupSettings } from 'components/FormGroupSettings'; +import { useWatchGroups } from '~/utilities/useWatchGroups'; +import { FormGroupSettings } from '~/components/FormGroupSettings'; +import { isGroupEmpty } from '~/utilities/utils'; + import './GroupSettings.scss'; -import { isGroupEmpty } from 'utilities/utils'; const GroupSettings: React.FC = () => { const { diff --git a/frontend/src/pages/learningCenter/ProviderTypeFilters.tsx b/frontend/src/pages/learningCenter/ProviderTypeFilters.tsx index b1738c397e..1e4acdce53 100644 --- a/frontend/src/pages/learningCenter/ProviderTypeFilters.tsx +++ b/frontend/src/pages/learningCenter/ProviderTypeFilters.tsx @@ -6,7 +6,7 @@ import FilterSidePanelCategoryItem from '~/components/FilterSidePanelCategoryIte import { removeQueryArgument, setQueryArgument } from '~/utilities/router'; import { PROVIDER_TYPE_FILTER_KEY } from './const'; import { useQueryFilters } from './useQueryFilters'; -import { ODH_PRODUCT_NAME } from 'utilities/const'; +import { ODH_PRODUCT_NAME } from '~/utilities/const'; type ProviderTypeFiltersProps = { docApps: OdhDocument[]; diff --git a/frontend/src/pages/modelServing/screens/const.ts b/frontend/src/pages/modelServing/screens/const.ts index d02dca7631..51853b7dca 100644 --- a/frontend/src/pages/modelServing/screens/const.ts +++ b/frontend/src/pages/modelServing/screens/const.ts @@ -1,4 +1,4 @@ -import { ServingRuntimeKind } from 'k8sTypes'; +import { ServingRuntimeKind } from '~/k8sTypes'; import { ServingRuntimeSize, TimeframeStepType, TimeframeTimeType, TimeframeTitle } from './types'; export const DEFAULT_MODEL_SERVER_SIZES: ServingRuntimeSize[] = [ diff --git a/frontend/src/pages/modelServing/screens/global/InferenceServiceTableRow.tsx b/frontend/src/pages/modelServing/screens/global/InferenceServiceTableRow.tsx index 0f179c18e3..0bc830c705 100644 --- a/frontend/src/pages/modelServing/screens/global/InferenceServiceTableRow.tsx +++ b/frontend/src/pages/modelServing/screens/global/InferenceServiceTableRow.tsx @@ -8,7 +8,7 @@ import InferenceServiceEndpoint from './InferenceServiceEndpoint'; import InferenceServiceProject from './InferenceServiceProject'; import InferenceServiceStatus from './InferenceServiceStatus'; import { Link } from 'react-router-dom'; -import useModelMetricsEnabled from 'pages/modelServing/useModelMetricsEnabled'; +import useModelMetricsEnabled from '~/pages/modelServing/useModelMetricsEnabled'; type InferenceServiceTableRowProps = { obj: InferenceServiceKind; diff --git a/frontend/src/pages/modelServing/screens/global/InternalServicePopoverContent.tsx b/frontend/src/pages/modelServing/screens/global/InternalServicePopoverContent.tsx index 56643823e5..53129466a2 100644 --- a/frontend/src/pages/modelServing/screens/global/InternalServicePopoverContent.tsx +++ b/frontend/src/pages/modelServing/screens/global/InternalServicePopoverContent.tsx @@ -5,7 +5,7 @@ import { DescriptionListGroup, DescriptionListTerm, } from '@patternfly/react-core'; -import { InferenceServiceKind } from 'k8sTypes'; +import { InferenceServiceKind } from '~/k8sTypes'; type InternalServicePopoverContentProps = { inferenceService: InferenceServiceKind; diff --git a/frontend/src/pages/modelServing/screens/metrics/utils.ts b/frontend/src/pages/modelServing/screens/metrics/utils.ts index a3fa7ab3ce..607559bd75 100644 --- a/frontend/src/pages/modelServing/screens/metrics/utils.ts +++ b/frontend/src/pages/modelServing/screens/metrics/utils.ts @@ -3,7 +3,7 @@ import { SelectOptionObject } from '@patternfly/react-core'; import { TimeframeTitle } from '~/pages/modelServing/screens/types'; import { InferenceServiceKind } from '~/k8sTypes'; import { ModelServingMetricType } from './ModelServingMetricsContext'; -import { DashboardConfig } from 'types'; +import { DashboardConfig } from '~/types'; export const isModelMetricsEnabled = ( dashboardNamespace: string, diff --git a/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/DataConnectionExistingField.tsx b/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/DataConnectionExistingField.tsx index 6d02f8ef9c..c9ee14195f 100644 --- a/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/DataConnectionExistingField.tsx +++ b/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/DataConnectionExistingField.tsx @@ -7,9 +7,9 @@ import { StackItem, TextInput, } from '@patternfly/react-core'; -import { DataConnection, UpdateObjectAtPropAndValue } from 'pages/projects/types'; +import { DataConnection, UpdateObjectAtPropAndValue } from '~/pages/projects/types'; import { CreatingInferenceServiceObject } from '~/pages/modelServing/screens/types'; -import { getDataConnectionDisplayName } from 'pages/projects/screens/detail/data-connections/utils'; +import { getDataConnectionDisplayName } from '~/pages/projects/screens/detail/data-connections/utils'; import './DataConnectionExistingField.scss'; type DataConnectionExistingFieldType = { diff --git a/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/DataConnectionSection.tsx b/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/DataConnectionSection.tsx index 8eafeb165a..127b0477ba 100644 --- a/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/DataConnectionSection.tsx +++ b/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/DataConnectionSection.tsx @@ -8,13 +8,13 @@ import { StackItem, TextInput, } from '@patternfly/react-core'; -import { DataConnection, UpdateObjectAtPropAndValue } from 'pages/projects/types'; +import { DataConnection, UpdateObjectAtPropAndValue } from '~/pages/projects/types'; import { CreatingInferenceServiceObject, InferenceServiceStorageType, } from '~/pages/modelServing/screens/types'; -import AWSField from 'pages/projects/dataConnections/AWSField'; -import useDataConnections from 'pages/projects/screens/detail/data-connections/useDataConnections'; +import AWSField from '~/pages/projects/dataConnections/AWSField'; +import useDataConnections from '~/pages/projects/screens/detail/data-connections/useDataConnections'; import '~/pages/projects/screens/detail/storage/ManageStorageModal.scss'; import DataConnectionExistingField from './DataConnectionExistingField'; diff --git a/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/ExistingProjectField.tsx b/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/ExistingProjectField.tsx index e124073676..0a9652ab4f 100644 --- a/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/ExistingProjectField.tsx +++ b/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/ExistingProjectField.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { Alert, FormGroup, Select, SelectOption, Skeleton } from '@patternfly/react-core'; import useModelServingProjects from './useModelServingProjects'; -import { getProjectDisplayName } from 'pages/projects/utils'; +import { getProjectDisplayName } from '~/pages/projects/utils'; type ExistingProjectFieldProps = { fieldId: string; diff --git a/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/InferenceServiceFrameworkSection.tsx b/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/InferenceServiceFrameworkSection.tsx index 89af483c8c..3a46a4b488 100644 --- a/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/InferenceServiceFrameworkSection.tsx +++ b/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/InferenceServiceFrameworkSection.tsx @@ -1,9 +1,9 @@ import * as React from 'react'; import { Alert, FormGroup, Select, SelectOption, Skeleton } from '@patternfly/react-core'; -import { UpdateObjectAtPropAndValue } from 'pages/projects/types'; +import { UpdateObjectAtPropAndValue } from '~/pages/projects/types'; import { CreatingInferenceServiceObject } from '~/pages/modelServing/screens/types'; import useModelFramework from './useModelFramework'; -import { SupportedModelFormats } from 'k8sTypes'; +import { SupportedModelFormats } from '~/k8sTypes'; type InferenceServiceFrameworkSectionProps = { data: CreatingInferenceServiceObject; diff --git a/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/ManageInferenceServiceModal.tsx b/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/ManageInferenceServiceModal.tsx index b7cfa05208..d8f3db97ad 100644 --- a/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/ManageInferenceServiceModal.tsx +++ b/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/ManageInferenceServiceModal.tsx @@ -12,13 +12,18 @@ import { } from '@patternfly/react-core'; import { useCreateInferenceServiceObject } from '~/pages/modelServing/screens/projects/utils'; import InferenceServiceFrameworkSection from './InferenceServiceFrameworkSection'; -import { assembleSecret, createInferenceService, createSecret, updateInferenceService } from 'api'; -import { InferenceServiceKind, ProjectKind, SecretKind, ServingRuntimeKind } from 'k8sTypes'; +import { + assembleSecret, + createInferenceService, + createSecret, + updateInferenceService, +} from '~/api'; +import { InferenceServiceKind, ProjectKind, SecretKind, ServingRuntimeKind } from '~/k8sTypes'; import ProjectSection from './ProjectSection'; -import { DataConnection } from 'pages/projects/types'; +import { DataConnection } from '~/pages/projects/types'; import DataConnectionSection from './DataConnectionSection'; import { InferenceServiceStorageType } from '~/pages/modelServing/screens/types'; -import { isAWSValid } from 'pages/projects/screens/spawner/spawnerUtils'; +import { isAWSValid } from '~/pages/projects/screens/spawner/spawnerUtils'; type ManageInferenceServiceModalProps = { isOpen: boolean; diff --git a/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/ProjectSection.tsx b/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/ProjectSection.tsx index 93e9171232..7b6fbbc1df 100644 --- a/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/ProjectSection.tsx +++ b/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/ProjectSection.tsx @@ -1,11 +1,11 @@ import * as React from 'react'; import { FormGroup, Text } from '@patternfly/react-core'; import { CreatingInferenceServiceObject } from '~/pages/modelServing/screens/types'; -import { UpdateObjectAtPropAndValue } from 'pages/projects/types'; -import { getProjectDisplayName } from 'pages/projects/utils'; -import { listServingRuntimes } from 'api'; -import ExistingProjectField from 'pages/modelServing/screens/projects/InferenceServiceModal/ExistingProjectField'; -import { InferenceServiceKind, ProjectKind } from 'k8sTypes'; +import { UpdateObjectAtPropAndValue } from '~/pages/projects/types'; +import { getProjectDisplayName } from '~/pages/projects/utils'; +import { listServingRuntimes } from '~/api'; +import ExistingProjectField from '~/pages/modelServing/screens/projects/InferenceServiceModal/ExistingProjectField'; +import { InferenceServiceKind, ProjectKind } from '~/k8sTypes'; import { defaultInferenceService } from '~/pages/modelServing/screens/projects/utils'; type ProjectSectionType = { diff --git a/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/useModelFramework.ts b/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/useModelFramework.ts index 46a55c91e0..7774e3462f 100644 --- a/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/useModelFramework.ts +++ b/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/useModelFramework.ts @@ -1,5 +1,5 @@ -import { getServingRuntime } from 'api'; -import { SupportedModelFormats } from 'k8sTypes'; +import { getServingRuntime } from '~/api'; +import { SupportedModelFormats } from '~/k8sTypes'; import * as React from 'react'; const useModelFramework = ( diff --git a/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/useModelServingProjects.ts b/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/useModelServingProjects.ts index c3ba6d4c09..9143ead1be 100644 --- a/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/useModelServingProjects.ts +++ b/frontend/src/pages/modelServing/screens/projects/InferenceServiceModal/useModelServingProjects.ts @@ -1,5 +1,5 @@ -import { getModelServingProjectsAvailable } from 'api'; -import { ProjectKind } from 'k8sTypes'; +import { getModelServingProjectsAvailable } from '~/api'; +import { ProjectKind } from '~/k8sTypes'; import * as React from 'react'; const useModelServingProjects = (): [ diff --git a/frontend/src/pages/modelServing/screens/projects/ServingRuntimeModal/ManageServingRuntimeModal.tsx b/frontend/src/pages/modelServing/screens/projects/ServingRuntimeModal/ManageServingRuntimeModal.tsx index 0380383c32..4d5e53889e 100644 --- a/frontend/src/pages/modelServing/screens/projects/ServingRuntimeModal/ManageServingRuntimeModal.tsx +++ b/frontend/src/pages/modelServing/screens/projects/ServingRuntimeModal/ManageServingRuntimeModal.tsx @@ -28,7 +28,7 @@ import { allSettledPromises } from '~/utilities/allSettledPromises'; import ServingRuntimeReplicaSection from './ServingRuntimeReplicaSection'; import ServingRuntimeSizeSection from './ServingRuntimeSizeSection'; import ServingRuntimeTokenSection from './ServingRuntimeTokenSection'; -import { translateDisplayNameForK8s } from 'pages/projects/utils'; +import { translateDisplayNameForK8s } from '~/pages/projects/utils'; import { requestsUnderLimits, resourcesArePositive } from '~/pages/modelServing/utils'; type ManageServingRuntimeModalProps = { diff --git a/frontend/src/pages/modelServing/screens/projects/ServingRuntimeModal/ServingRuntimeReplicaSection.tsx b/frontend/src/pages/modelServing/screens/projects/ServingRuntimeModal/ServingRuntimeReplicaSection.tsx index 91dabf01c8..19ccc7cf76 100644 --- a/frontend/src/pages/modelServing/screens/projects/ServingRuntimeModal/ServingRuntimeReplicaSection.tsx +++ b/frontend/src/pages/modelServing/screens/projects/ServingRuntimeModal/ServingRuntimeReplicaSection.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { FormGroup, FormSection, NumberInput } from '@patternfly/react-core'; -import { UpdateObjectAtPropAndValue } from 'pages/projects/types'; +import { UpdateObjectAtPropAndValue } from '~/pages/projects/types'; import { CreatingServingRuntimeObject } from '~/pages/modelServing/screens/types'; -import { isHTMLInputElement, normalizeBetween } from 'utilities/utils'; +import { isHTMLInputElement, normalizeBetween } from '~/utilities/utils'; type ServingRuntimeReplicaSectionProps = { data: CreatingServingRuntimeObject; diff --git a/frontend/src/pages/modelServing/screens/projects/ServingRuntimeModal/ServingRuntimeSizeExpandedField.tsx b/frontend/src/pages/modelServing/screens/projects/ServingRuntimeModal/ServingRuntimeSizeExpandedField.tsx index 8b810d48ae..52c1846fdd 100644 --- a/frontend/src/pages/modelServing/screens/projects/ServingRuntimeModal/ServingRuntimeSizeExpandedField.tsx +++ b/frontend/src/pages/modelServing/screens/projects/ServingRuntimeModal/ServingRuntimeSizeExpandedField.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { FormGroup, Grid } from '@patternfly/react-core'; -import IndentSection from 'pages/projects/components/IndentSection'; -import { UpdateObjectAtPropAndValue } from 'pages/projects/types'; +import IndentSection from '~/pages/projects/components/IndentSection'; +import { UpdateObjectAtPropAndValue } from '~/pages/projects/types'; import { CreatingServingRuntimeObject } from '~/pages/modelServing/screens/types'; import { ContainerResourceAttributes, ContainerResources } from '~/types'; import CPUField from '~/components/CPUField'; diff --git a/frontend/src/pages/modelServing/screens/projects/ServingRuntimeModal/ServingRuntimeSizeSection.tsx b/frontend/src/pages/modelServing/screens/projects/ServingRuntimeModal/ServingRuntimeSizeSection.tsx index 6ae938a89e..6f27a06d46 100644 --- a/frontend/src/pages/modelServing/screens/projects/ServingRuntimeModal/ServingRuntimeSizeSection.tsx +++ b/frontend/src/pages/modelServing/screens/projects/ServingRuntimeModal/ServingRuntimeSizeSection.tsx @@ -8,7 +8,7 @@ import { Stack, StackItem, } from '@patternfly/react-core'; -import { UpdateObjectAtPropAndValue } from 'pages/projects/types'; +import { UpdateObjectAtPropAndValue } from '~/pages/projects/types'; import { CreatingServingRuntimeObject, ServingRuntimeSize, diff --git a/frontend/src/pages/modelServing/screens/projects/ServingRuntimeModal/ServingRuntimeTokenInput.tsx b/frontend/src/pages/modelServing/screens/projects/ServingRuntimeModal/ServingRuntimeTokenInput.tsx index e0ce1381c4..ce5d937f8c 100644 --- a/frontend/src/pages/modelServing/screens/projects/ServingRuntimeModal/ServingRuntimeTokenInput.tsx +++ b/frontend/src/pages/modelServing/screens/projects/ServingRuntimeModal/ServingRuntimeTokenInput.tsx @@ -7,13 +7,13 @@ import { TextInput, ValidatedOptions, } from '@patternfly/react-core'; -import { UpdateObjectAtPropAndValue } from 'pages/projects/types'; +import { UpdateObjectAtPropAndValue } from '~/pages/projects/types'; import { CreatingServingRuntimeObject, ServingRuntimeToken, } from '~/pages/modelServing/screens/types'; import { ExclamationCircleIcon, MinusCircleIcon } from '@patternfly/react-icons'; -import { translateDisplayNameForK8s } from 'pages/projects/utils'; +import { translateDisplayNameForK8s } from '~/pages/projects/utils'; type ServingRuntimeTokenInputProps = { data: CreatingServingRuntimeObject; diff --git a/frontend/src/pages/modelServing/screens/projects/ServingRuntimeModal/ServingRuntimeTokenSection.tsx b/frontend/src/pages/modelServing/screens/projects/ServingRuntimeModal/ServingRuntimeTokenSection.tsx index ea6be43d98..79e7dea870 100644 --- a/frontend/src/pages/modelServing/screens/projects/ServingRuntimeModal/ServingRuntimeTokenSection.tsx +++ b/frontend/src/pages/modelServing/screens/projects/ServingRuntimeModal/ServingRuntimeTokenSection.tsx @@ -9,8 +9,8 @@ import { Stack, StackItem, } from '@patternfly/react-core'; -import IndentSection from 'pages/projects/components/IndentSection'; -import { UpdateObjectAtPropAndValue } from 'pages/projects/types'; +import IndentSection from '~/pages/projects/components/IndentSection'; +import { UpdateObjectAtPropAndValue } from '~/pages/projects/types'; import { CreatingServingRuntimeObject } from '~/pages/modelServing/screens/types'; import { PlusCircleIcon } from '@patternfly/react-icons'; import ServingRuntimeTokenInput from './ServingRuntimeTokenInput'; diff --git a/frontend/src/pages/modelServing/screens/projects/utils.ts b/frontend/src/pages/modelServing/screens/projects/utils.ts index abafbe6401..0962e4c52c 100644 --- a/frontend/src/pages/modelServing/screens/projects/utils.ts +++ b/frontend/src/pages/modelServing/screens/projects/utils.ts @@ -1,23 +1,23 @@ import * as React from 'react'; import * as _ from 'lodash'; -import { ConfigMapKind, InferenceServiceKind, SecretKind, ServingRuntimeKind } from 'k8sTypes'; -import { UpdateObjectAtPropAndValue } from 'pages/projects/types'; -import useGenericObjectState from 'utilities/useGenericObjectState'; +import { ConfigMapKind, InferenceServiceKind, SecretKind, ServingRuntimeKind } from '~/k8sTypes'; +import { UpdateObjectAtPropAndValue } from '~/pages/projects/types'; +import useGenericObjectState from '~/utilities/useGenericObjectState'; import { CreatingInferenceServiceObject, CreatingServingRuntimeObject, InferenceServiceStorageType, ServingRuntimeSize, } from '~/pages/modelServing/screens/types'; -import { ContainerResourceAttributes, DashboardConfig, GpuSettingString } from 'types'; +import { ContainerResourceAttributes, DashboardConfig, GpuSettingString } from '~/types'; import { DEFAULT_MODEL_SERVER_SIZES, DEFAULT_MODEL_SERVING_TEMPLATE, } from '~/pages/modelServing/screens/const'; -import { useAppContext } from 'app/AppContext'; -import { useDeepCompareMemoize } from 'utilities/useDeepCompareMemoize'; -import { EMPTY_AWS_SECRET_DATA } from 'pages/projects/dataConnections/const'; -import { getDisplayNameFromK8sResource } from 'pages/projects/utils'; +import { useAppContext } from '~/app/AppContext'; +import { useDeepCompareMemoize } from '~/utilities/useDeepCompareMemoize'; +import { EMPTY_AWS_SECRET_DATA } from '~/pages/projects/dataConnections/const'; +import { getDisplayNameFromK8sResource } from '~/pages/projects/utils'; import YAML from 'yaml'; import { ProjectDetailsContext } from '~/pages/projects/ProjectDetailsContext'; diff --git a/frontend/src/pages/modelServing/screens/types.ts b/frontend/src/pages/modelServing/screens/types.ts index 7eda102660..6f8f6339eb 100644 --- a/frontend/src/pages/modelServing/screens/types.ts +++ b/frontend/src/pages/modelServing/screens/types.ts @@ -1,4 +1,4 @@ -import { EnvVariableDataEntry } from 'pages/projects/types'; +import { EnvVariableDataEntry } from '~/pages/projects/types'; import { ContainerResources } from '~/types'; export enum TimeframeTitle { diff --git a/frontend/src/pages/modelServing/useModelMetricsEnabled.ts b/frontend/src/pages/modelServing/useModelMetricsEnabled.ts index 2708cf04a9..8319193654 100644 --- a/frontend/src/pages/modelServing/useModelMetricsEnabled.ts +++ b/frontend/src/pages/modelServing/useModelMetricsEnabled.ts @@ -1,5 +1,5 @@ -import { useAppContext } from 'app/AppContext'; -import { useDashboardNamespace } from 'redux/selectors'; +import { useAppContext } from '~/app/AppContext'; +import { useDashboardNamespace } from '~/redux/selectors'; import { isModelMetricsEnabled } from './screens/metrics/utils'; const useModelMetricsEnabled = (): [modelMetricsEnabled: boolean] => { diff --git a/frontend/src/pages/notebookController/screens/server/ImageVersions.tsx b/frontend/src/pages/notebookController/screens/server/ImageVersions.tsx index 7ec26820f5..c6720e0d71 100644 --- a/frontend/src/pages/notebookController/screens/server/ImageVersions.tsx +++ b/frontend/src/pages/notebookController/screens/server/ImageVersions.tsx @@ -9,7 +9,7 @@ import { getVersion, isImageTagBuildValid, } from '~/utilities/imageUtils'; -import { useAppContext } from 'app/AppContext'; +import { useAppContext } from '~/app/AppContext'; import '~/pages/notebookController/NotebookController.scss'; diff --git a/frontend/src/pages/notebookController/screens/server/StopServerModal.tsx b/frontend/src/pages/notebookController/screens/server/StopServerModal.tsx index e510ff5ac6..3114096c01 100644 --- a/frontend/src/pages/notebookController/screens/server/StopServerModal.tsx +++ b/frontend/src/pages/notebookController/screens/server/StopServerModal.tsx @@ -4,7 +4,7 @@ import { Notebook } from '~/types'; import { stopNotebook } from '~/services/notebookService'; import useNotification from '~/utilities/useNotification'; import { allSettledPromises } from '~/utilities/allSettledPromises'; -import { useUser } from 'redux/selectors'; +import { useUser } from '~/redux/selectors'; type StopServerModalProps = { notebooksToStop: Notebook[]; diff --git a/frontend/src/pages/projects/ProjectViewRoutes.tsx b/frontend/src/pages/projects/ProjectViewRoutes.tsx index a9d69370eb..51cb67de9f 100644 --- a/frontend/src/pages/projects/ProjectViewRoutes.tsx +++ b/frontend/src/pages/projects/ProjectViewRoutes.tsx @@ -6,7 +6,7 @@ import ProjectDetailsContextProvider from './ProjectDetailsContext'; import SpawnerPage from './screens/spawner/SpawnerPage'; import EditSpawnerPage from './screens/spawner/EditSpawnerPage'; import DetailsPageMetricsWrapper from '~/pages/modelServing/screens/projects/DetailsPageMetricsWrapper'; -import useModelMetricsEnabled from 'pages/modelServing/useModelMetricsEnabled'; +import useModelMetricsEnabled from '~/pages/modelServing/useModelMetricsEnabled'; const ProjectViewRoutes: React.FC = () => { const [modelMetricsEnabled] = useModelMetricsEnabled(); diff --git a/frontend/src/pages/projects/screens/detail/ProjectDetails.tsx b/frontend/src/pages/projects/screens/detail/ProjectDetails.tsx index 6541afe7ed..66349a5731 100644 --- a/frontend/src/pages/projects/screens/detail/ProjectDetails.tsx +++ b/frontend/src/pages/projects/screens/detail/ProjectDetails.tsx @@ -7,7 +7,7 @@ import { ProjectSectionTitles, ProjectSectionTitlesExtended } from './const'; import GenericSidebar from '~/pages/projects/components/GenericSidebar'; import StorageList from './storage/StorageList'; import { ProjectSectionID } from './types'; -import { useAppContext } from 'app/AppContext'; +import { useAppContext } from '~/app/AppContext'; import ServingRuntimeList from '~/pages/modelServing/screens/projects/ServingRuntimeList'; import NotebooksList from './notebooks/NotebookList'; import { ProjectDetailsContext } from '~/pages/projects/ProjectDetailsContext'; diff --git a/frontend/src/services/envService.ts b/frontend/src/services/envService.ts index a0bcdb49d7..751e08c671 100644 --- a/frontend/src/services/envService.ts +++ b/frontend/src/services/envService.ts @@ -1,5 +1,5 @@ import axios from 'axios'; -import { ConfigMap, Secret } from 'types'; +import { ConfigMap, Secret } from '~/types'; export const getEnvSecret = (namespace: string, name: string): Promise => { const url = `/api/envs/secret/${namespace}/${name}`; diff --git a/frontend/src/services/gpuService.ts b/frontend/src/services/gpuService.ts index d767a2fa75..bb6f7f9d7c 100644 --- a/frontend/src/services/gpuService.ts +++ b/frontend/src/services/gpuService.ts @@ -1,5 +1,5 @@ import axios from 'axios'; -import { GPUInfo } from 'types'; +import { GPUInfo } from '~/types'; export const getGPU = (): Promise => { const url = '/api/gpu'; diff --git a/frontend/src/types.ts b/frontend/src/types.ts index 6e2dd7d499..34efe33989 100644 --- a/frontend/src/types.ts +++ b/frontend/src/types.ts @@ -5,7 +5,7 @@ import { ImageStreamKind, ImageStreamSpecTagType } from './k8sTypes'; import { EitherNotBoth } from './typeHelpers'; import { EnvironmentFromVariable } from './pages/projects/types'; -import { ServingRuntimeSize } from 'pages/modelServing/screens/types'; +import { ServingRuntimeSize } from '~/pages/modelServing/screens/types'; export type PrometheusQueryResponse = { data: { diff --git a/frontend/src/utilities/useWatchGroups.tsx b/frontend/src/utilities/useWatchGroups.tsx index e1f9e4d2d2..66311036e4 100644 --- a/frontend/src/utilities/useWatchGroups.tsx +++ b/frontend/src/utilities/useWatchGroups.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { GroupsConfig } from 'pages/groupSettings/groupTypes'; -import { fetchGroupsSettings, updateGroupsSettings } from 'services/groupSettingsService'; +import { GroupsConfig } from '~/pages/groupSettings/groupTypes'; +import { fetchGroupsSettings, updateGroupsSettings } from '~/services/groupSettingsService'; import useNotification from './useNotification'; export const useWatchGroups = (): { diff --git a/frontend/src/utilities/useWatchNotebooksForUsers.tsx b/frontend/src/utilities/useWatchNotebooksForUsers.tsx index d1b31bc210..20107cdcfa 100644 --- a/frontend/src/utilities/useWatchNotebooksForUsers.tsx +++ b/frontend/src/utilities/useWatchNotebooksForUsers.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { NotebookRunningState, UsernameMap } from '~/types'; import { POLL_INTERVAL } from './const'; -import { getNotebookAndStatus } from 'services/notebookService'; +import { getNotebookAndStatus } from '~/services/notebookService'; import { generateNotebookNameFromUsername } from './notebookControllerUtils'; import { allSettledPromises } from './allSettledPromises'; import { useDeepCompareMemoize } from './useDeepCompareMemoize'; diff --git a/frontend/src/utilities/useWatchSegmentKey.tsx b/frontend/src/utilities/useWatchSegmentKey.tsx index 9003124db5..187e7dc4e2 100644 --- a/frontend/src/utilities/useWatchSegmentKey.tsx +++ b/frontend/src/utilities/useWatchSegmentKey.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { fetchSegmentKey } from 'services/segmentKeyService'; +import { fetchSegmentKey } from '~/services/segmentKeyService'; import { ODHSegmentKey } from '~/types'; import { POLL_INTERVAL } from './const';