diff --git a/frontend/src/components/App/PluginSettings/PluginSettings.tsx b/frontend/src/components/App/PluginSettings/PluginSettings.tsx index a2d1eec360f..7ddc4db7e1d 100644 --- a/frontend/src/components/App/PluginSettings/PluginSettings.tsx +++ b/frontend/src/components/App/PluginSettings/PluginSettings.tsx @@ -9,8 +9,10 @@ import helpers from '../../../helpers'; import { useFilterFunc } from '../../../lib/util'; import { PluginInfo, reloadPage, setPluginSettings } from '../../../plugin/pluginsSlice'; import { useTypedSelector } from '../../../redux/reducers/reducers'; -import { Link as HeadlampLink, SectionBox, SimpleTable } from '../../common'; +import HeadlampLink from '../../common/Link'; +import SectionBox from '../../common/SectionBox'; import SectionFilterHeader from '../../common/SectionFilterHeader'; +import SimpleTable from '../../common/SimpleTable'; /** * Interface of the component's props structure. diff --git a/frontend/src/components/App/PluginSettings/PluginSettingsDetails.tsx b/frontend/src/components/App/PluginSettings/PluginSettingsDetails.tsx index 3b78df9fc83..a930e8b1ff4 100644 --- a/frontend/src/components/App/PluginSettings/PluginSettingsDetails.tsx +++ b/frontend/src/components/App/PluginSettings/PluginSettingsDetails.tsx @@ -13,9 +13,9 @@ import { ConfigStore } from '../../../plugin/configStore'; import { PluginInfo, reloadPage } from '../../../plugin/pluginsSlice'; import { useTypedSelector } from '../../../redux/reducers/reducers'; import NotFoundComponent from '../../404'; -import { SectionBox } from '../../common'; import { ConfirmDialog } from '../../common/Dialog'; import ErrorBoundary from '../../common/ErrorBoundary'; +import SectionBox from '../../common/SectionBox'; const PluginSettingsDetailsInitializer = (props: { plugin: PluginInfo }) => { const { plugin } = props; diff --git a/frontend/src/components/App/Settings/SettingsCluster.tsx b/frontend/src/components/App/Settings/SettingsCluster.tsx index a580b33f910..2fb4b987f57 100644 --- a/frontend/src/components/App/Settings/SettingsCluster.tsx +++ b/frontend/src/components/App/Settings/SettingsCluster.tsx @@ -10,8 +10,8 @@ import helpers, { ClusterSettings } from '../../../helpers'; import { useCluster, useClustersConf } from '../../../lib/k8s'; import { deleteCluster } from '../../../lib/k8s/apiProxy'; import { setConfig } from '../../../redux/configSlice'; -import { Link } from '../../common'; import ConfirmButton from '../../common/ConfirmButton'; +import Link from '../../common/Link'; import NameValueTable from '../../common/NameValueTable/NameValueTable'; import SectionBox from '../../common/SectionBox'; diff --git a/frontend/src/components/App/Settings/SettingsClusters.tsx b/frontend/src/components/App/Settings/SettingsClusters.tsx index 006c24af153..b93df2a0a16 100644 --- a/frontend/src/components/App/Settings/SettingsClusters.tsx +++ b/frontend/src/components/App/Settings/SettingsClusters.tsx @@ -1,6 +1,8 @@ import { useTranslation } from 'react-i18next'; import { useClustersConf } from '../../../lib/k8s'; -import { Link, SectionBox, SimpleTable } from '../../common'; +import Link from '../../common/Link'; +import SectionBox from '../../common/SectionBox'; +import SimpleTable from '../../common/SimpleTable'; export default function SettingsClusters() { const clusterConf = useClustersConf(); diff --git a/frontend/src/components/DetailsViewSection/DetailsViewSection.stories.tsx b/frontend/src/components/DetailsViewSection/DetailsViewSection.stories.tsx index 0ec1a2246ae..f4954e6cbbe 100644 --- a/frontend/src/components/DetailsViewSection/DetailsViewSection.stories.tsx +++ b/frontend/src/components/DetailsViewSection/DetailsViewSection.stories.tsx @@ -4,7 +4,7 @@ import React from 'react'; import { Provider } from 'react-redux'; import { useDispatch } from 'react-redux'; import { MemoryRouter } from 'react-router-dom'; -import { SectionBox } from '../common'; +import SectionBox from '../common/SectionBox'; import DetailsViewSection, { DetailsViewSectionProps } from './DetailsViewSection'; import { setDetailsView } from './detailsViewSectionSlice'; diff --git a/frontend/src/components/common/index.test.ts b/frontend/src/components/common/index.test.ts index fa14f32decb..331d1dceeed 100644 --- a/frontend/src/components/common/index.test.ts +++ b/frontend/src/components/common/index.test.ts @@ -13,9 +13,6 @@ const avoidCheck = [ 'ErrorBoundary', 'LogViewer', 'Terminal', -]; - -const checkExports = [ 'ActionButton', 'BackLink', 'Chart', @@ -44,6 +41,8 @@ const checkExports = [ 'ObjectEventList', ]; +const checkExports: string[] = []; + function getFilesToVerify() { const filesToVerify: string[] = []; fs.readdirSync(__dirname).forEach(file => { diff --git a/frontend/src/components/common/index.ts b/frontend/src/components/common/index.ts index 2b4b4377fec..bdd814c7a42 100644 --- a/frontend/src/components/common/index.ts +++ b/frontend/src/components/common/index.ts @@ -11,8 +11,8 @@ // export * from './Label'; // export * from './LabelListItem'; // export { default as LabelListItem } from './LabelListItem'; -export * from './Link'; -export { default as Link } from './Link'; +// export * from './Link'; +// export { default as Link } from './Link'; // export * from './Loader'; // export { default as Loader } from './Loader'; // export * from './NameValueTable'; @@ -23,15 +23,15 @@ export { default as Link } from './Link'; // export * as Resource from './Resource'; // export * from './Resource/EditorDialog'; // export { default as EditorDialog } from './Resource/EditorDialog'; -export * from './SectionBox'; +// export * from './SectionBox'; // export * from './SectionFilterHeader'; // export { default as SectionFilterHeader } from './SectionFilterHeader'; -export * from './SectionHeader'; -export { default as SectionHeader } from './SectionHeader'; +// export * from './SectionHeader'; +// export { default as SectionHeader } from './SectionHeader'; // export * from './ShowHideLabel'; // export { default as ShowHideLabel } from './ShowHideLabel'; -export * from './SimpleTable'; -export { default as SimpleTable } from './SimpleTable'; +// export * from './SimpleTable'; +// export { default as SimpleTable } from './SimpleTable'; // export * from './Tabs'; // export { default as Tabs } from './Tabs'; // export * from './TileChart'; @@ -46,3 +46,5 @@ export { default as SimpleTable } from './SimpleTable'; // export * from './ConfirmButton'; // export { default as ConfirmButton } from './ConfirmButton'; // export * from './NamespacesAutocomplete'; + +export {}; diff --git a/frontend/src/components/crd/List.tsx b/frontend/src/components/crd/List.tsx index 4e49763d43a..fa19619f66b 100644 --- a/frontend/src/components/crd/List.tsx +++ b/frontend/src/components/crd/List.tsx @@ -1,6 +1,6 @@ import { useTranslation } from 'react-i18next'; import CRD from '../../lib/k8s/crd'; -import { Link } from '../common'; +import Link from '../common/Link'; import ResourceListView from '../common/Resource/ResourceListView'; export default function CustomResourceDefinitionList() { diff --git a/frontend/src/components/daemonset/Details.tsx b/frontend/src/components/daemonset/Details.tsx index 04314742c08..3e4cc33b462 100644 --- a/frontend/src/components/daemonset/Details.tsx +++ b/frontend/src/components/daemonset/Details.tsx @@ -1,13 +1,14 @@ import { useTranslation } from 'react-i18next'; import { useParams } from 'react-router-dom'; import DaemonSet from '../../lib/k8s/daemonSet'; -import { SectionBox, SimpleTable } from '../common'; import { ContainersSection, DetailsGrid, MetadataDictGrid, OwnedPodsSection, } from '../common/Resource'; +import SectionBox from '../common/SectionBox'; +import SimpleTable from '../common/SimpleTable'; interface TolerationsSection { resource: DaemonSet; diff --git a/frontend/src/components/endpoints/Details.tsx b/frontend/src/components/endpoints/Details.tsx index 030ded0bc9c..28943bc9842 100644 --- a/frontend/src/components/endpoints/Details.tsx +++ b/frontend/src/components/endpoints/Details.tsx @@ -2,10 +2,11 @@ import { useTranslation } from 'react-i18next'; import { useLocation, useParams } from 'react-router-dom'; import { ResourceClasses } from '../../lib/k8s'; import Endpoints, { KubeEndpoint } from '../../lib/k8s/endpoints'; -import { Link, SectionHeader } from '../common'; import Empty from '../common/EmptyContent'; +import Link from '../common/Link'; import { DetailsGrid } from '../common/Resource'; import { SectionBox } from '../common/SectionBox'; +import SectionHeader from '../common/SectionHeader'; import SimpleTable from '../common/SimpleTable'; export default function EndpointDetails() { diff --git a/frontend/src/components/horizontalPodAutoscaler/List.tsx b/frontend/src/components/horizontalPodAutoscaler/List.tsx index 0c3532b7663..43e93cf3c12 100644 --- a/frontend/src/components/horizontalPodAutoscaler/List.tsx +++ b/frontend/src/components/horizontalPodAutoscaler/List.tsx @@ -2,7 +2,7 @@ import { Chip } from '@mui/material'; import { styled } from '@mui/system'; import { useTranslation } from 'react-i18next'; import HPA from '../../lib/k8s/hpa'; -import { Link } from '../common'; +import Link from '../common/Link'; import ResourceListView from '../common/Resource/ResourceListView'; const RootDiv = styled('div')(({ theme }) => ({ diff --git a/frontend/src/components/limitRange/List.tsx b/frontend/src/components/limitRange/List.tsx index ca8492fe2e8..9717e232474 100644 --- a/frontend/src/components/limitRange/List.tsx +++ b/frontend/src/components/limitRange/List.tsx @@ -1,8 +1,8 @@ import { useTranslation } from 'react-i18next'; import { ApiError } from '../../lib/k8s/apiProxy'; import { LimitRange } from '../../lib/k8s/limitRange'; -import { SimpleTableProps } from '../common'; import ResourceListView from '../common/Resource/ResourceListView'; +import { SimpleTableProps } from '../common/SimpleTable'; export interface LimitRangeProps { limitRanges: LimitRange[] | null; diff --git a/frontend/src/components/namespace/List.tsx b/frontend/src/components/namespace/List.tsx index a6a25b8a31f..0be1fad90f9 100644 --- a/frontend/src/components/namespace/List.tsx +++ b/frontend/src/components/namespace/List.tsx @@ -3,8 +3,8 @@ import { useTranslation } from 'react-i18next'; import helpers from '../../helpers'; import { useCluster } from '../../lib/k8s'; import Namespace from '../../lib/k8s/namespace'; -import { Link } from '../common'; import { StatusLabel } from '../common/Label'; +import Link from '../common/Link'; import ResourceListView from '../common/Resource/ResourceListView'; import { ResourceTableFromResourceClassProps, diff --git a/frontend/src/components/resourceQuota/List.tsx b/frontend/src/components/resourceQuota/List.tsx index c882b39eac1..eab1e2dd083 100644 --- a/frontend/src/components/resourceQuota/List.tsx +++ b/frontend/src/components/resourceQuota/List.tsx @@ -3,8 +3,8 @@ import { styled } from '@mui/system'; import { useTranslation } from 'react-i18next'; import { ApiError } from '../../lib/k8s/apiProxy'; import ResourceQuota from '../../lib/k8s/resourceQuota'; -import { SimpleTableProps } from '../common'; import ResourceListView from '../common/Resource/ResourceListView'; +import { SimpleTableProps } from '../common/SimpleTable'; const WrappingBox = styled(Box)(({ theme }) => ({ display: 'flex', diff --git a/frontend/src/components/role/BindingDetails.tsx b/frontend/src/components/role/BindingDetails.tsx index 6f2fe86cc36..7f06b3e4eed 100644 --- a/frontend/src/components/role/BindingDetails.tsx +++ b/frontend/src/components/role/BindingDetails.tsx @@ -2,7 +2,7 @@ import { useTranslation } from 'react-i18next'; import { useParams } from 'react-router-dom'; import ClusterRoleBinding from '../../lib/k8s/clusterRoleBinding'; import RoleBinding from '../../lib/k8s/roleBinding'; -import { Link } from '../common'; +import Link from '../common/Link'; import { DetailsGrid } from '../common/Resource'; import { SectionBox } from '../common/SectionBox'; import SimpleTable from '../common/SimpleTable'; diff --git a/frontend/src/components/role/BindingList.tsx b/frontend/src/components/role/BindingList.tsx index 0002cd50a10..df6bdb64d1b 100644 --- a/frontend/src/components/role/BindingList.tsx +++ b/frontend/src/components/role/BindingList.tsx @@ -3,8 +3,8 @@ import { useTranslation } from 'react-i18next'; import ClusterRoleBinding from '../../lib/k8s/clusterRoleBinding'; import RoleBinding, { KubeRoleBinding } from '../../lib/k8s/roleBinding'; import { useErrorState, useFilterFunc } from '../../lib/util'; -import { Link } from '../common'; import LabelListItem from '../common/LabelListItem'; +import Link from '../common/Link'; import ResourceListView from '../common/Resource/ResourceListView'; interface RoleBindingDict { diff --git a/frontend/src/components/service/Details.tsx b/frontend/src/components/service/Details.tsx index 2c260aa8ad1..2e1e90b15ce 100644 --- a/frontend/src/components/service/Details.tsx +++ b/frontend/src/components/service/Details.tsx @@ -6,9 +6,9 @@ import { useTranslation } from 'react-i18next'; import { useParams } from 'react-router-dom'; import Endpoints from '../../lib/k8s/endpoints'; import Service from '../../lib/k8s/service'; -import { Link } from '../common'; import Empty from '../common/EmptyContent'; import { ValueLabel } from '../common/Label'; +import Link from '../common/Link'; import { DetailsGrid, MetadataDictGrid } from '../common/Resource'; import PortForward from '../common/Resource/PortForward'; import { SectionBox } from '../common/SectionBox'; diff --git a/frontend/src/components/serviceaccount/Details.tsx b/frontend/src/components/serviceaccount/Details.tsx index f89f65716da..f6e275e6a12 100644 --- a/frontend/src/components/serviceaccount/Details.tsx +++ b/frontend/src/components/serviceaccount/Details.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import { useParams } from 'react-router-dom'; import ServiceAccount from '../../lib/k8s/serviceAccount'; -import { Link } from '../common'; +import Link from '../common/Link'; import { DetailsGrid } from '../common/Resource'; export default function ServiceAccountDetails() { diff --git a/frontend/src/components/storage/ClaimDetails.tsx b/frontend/src/components/storage/ClaimDetails.tsx index 46ae649b291..770b494bad4 100644 --- a/frontend/src/components/storage/ClaimDetails.tsx +++ b/frontend/src/components/storage/ClaimDetails.tsx @@ -1,7 +1,7 @@ import { useTranslation } from 'react-i18next'; import { useParams } from 'react-router-dom'; import PersistentVolumeClaim from '../../lib/k8s/persistentVolumeClaim'; -import { Link } from '../common'; +import Link from '../common/Link'; import { DetailsGrid } from '../common/Resource'; import { StatusLabelByPhase } from './utils'; diff --git a/frontend/src/components/storage/ClaimList.tsx b/frontend/src/components/storage/ClaimList.tsx index bfea60cdcc6..cdb719c3a96 100644 --- a/frontend/src/components/storage/ClaimList.tsx +++ b/frontend/src/components/storage/ClaimList.tsx @@ -1,7 +1,7 @@ import { useTranslation } from 'react-i18next'; import PersistentVolumeClaim from '../../lib/k8s/persistentVolumeClaim'; -import { Link } from '../common'; import LabelListItem from '../common/LabelListItem'; +import Link from '../common/Link'; import ResourceListView from '../common/Resource/ResourceListView'; import { makePVCStatusLabel } from './ClaimDetails'; diff --git a/frontend/src/components/storage/VolumeDetails.tsx b/frontend/src/components/storage/VolumeDetails.tsx index e4f58e5e90f..87bdc638658 100644 --- a/frontend/src/components/storage/VolumeDetails.tsx +++ b/frontend/src/components/storage/VolumeDetails.tsx @@ -1,7 +1,7 @@ import { useTranslation } from 'react-i18next'; import { useParams } from 'react-router-dom'; import PersistentVolume from '../../lib/k8s/persistentVolume'; -import { Link } from '../common'; +import Link from '../common/Link'; import { DetailsGrid } from '../common/Resource'; import { StatusLabelByPhase } from './utils'; diff --git a/frontend/src/components/verticalPodAutoscaler/List.tsx b/frontend/src/components/verticalPodAutoscaler/List.tsx index d6ded38f3ec..37b95352226 100644 --- a/frontend/src/components/verticalPodAutoscaler/List.tsx +++ b/frontend/src/components/verticalPodAutoscaler/List.tsx @@ -2,9 +2,9 @@ import { Link, Paper, Typography } from '@mui/material'; import { useEffect, useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; import VPA from '../../lib/k8s/vpa'; -import { SectionBox } from '../common'; import Empty from '../common/EmptyContent'; import ResourceListView from '../common/Resource/ResourceListView'; +import SectionBox from '../common/SectionBox'; export default function VpaList() { const { t } = useTranslation(['glossary', 'translation']);