From d16eda6e5623e6c18b6e1fc20aebc1daf1d789c8 Mon Sep 17 00:00:00 2001 From: "Michael S. Molina" <70410625+michael-s-molina@users.noreply.github.com> Date: Wed, 1 Mar 2023 10:35:22 -0500 Subject: [PATCH] refactor: Organizes the pages in their own folder (#23241) --- .../AlertReportList/AlertReportList.test.jsx} | 2 +- .../AlertReportList/index.tsx} | 4 +- .../AllEntities/index.tsx} | 2 +- .../AnnotationLayerList.test.jsx} | 2 +- .../AnnotationLayerList/index.tsx} | 4 +- .../AnnotationList}/AnnotationList.test.jsx | 2 +- .../AnnotationList/index.tsx} | 4 +- .../ExplorePage.tsx => pages/Chart/index.tsx} | 14 +-- .../src/pages/ChartList/index.tsx | 2 +- .../CssTemplateList/CssTemplateList.test.jsx} | 2 +- .../CssTemplateList/index.tsx} | 4 +- .../Dashboard/index.tsx} | 2 +- .../DashboardList}/DashboardList.test.jsx | 2 +- .../DashboardList/index.tsx} | 4 +- .../DatabaseList}/DatabaseList.test.jsx | 2 +- .../DatabaseList/index.tsx} | 5 +- .../DatasetCreation/DatasetCreation.test.tsx} | 2 +- .../DatasetCreation}/index.tsx | 18 +-- .../DatasetList}/DatasetList.test.tsx | 2 +- .../DatasetList/index.tsx} | 4 +- .../ExecutionLogList.test.jsx} | 2 +- .../ExecutionLogList/index.tsx} | 2 +- .../Home/Home.test.tsx} | 2 +- .../Welcome.tsx => pages/Home/index.tsx} | 10 +- .../QueryHistoryList.test.tsx} | 2 +- .../QueryHistoryList/index.tsx} | 2 +- .../SavedQueryList}/SavedQueryList.test.jsx | 2 +- .../SavedQueryList/index.tsx} | 2 +- .../tags/TagList.tsx => pages/Tags/index.tsx} | 4 +- .../CRUD/chart}/ChartCard.tsx | 0 .../src/views/CRUD/welcome/ActivityTable.tsx | 2 +- .../src/views/CRUD/welcome/ChartTable.tsx | 4 +- .../src/views/CRUD/welcome/DashboardTable.tsx | 2 +- .../src/views/CRUD/welcome/SavedQueries.tsx | 2 +- superset-frontend/src/views/routes.test.tsx | 4 +- superset-frontend/src/views/routes.tsx | 118 +++++++++--------- 36 files changed, 120 insertions(+), 123 deletions(-) rename superset-frontend/src/{views/CRUD/alert/AlertList.test.jsx => pages/AlertReportList/AlertReportList.test.jsx} (98%) rename superset-frontend/src/{views/CRUD/alert/AlertList.tsx => pages/AlertReportList/index.tsx} (99%) rename superset-frontend/src/{views/CRUD/allentities/AllEntities.tsx => pages/AllEntities/index.tsx} (97%) rename superset-frontend/src/{views/CRUD/annotationlayers/AnnotationLayersList.test.jsx => pages/AnnotationLayerList/AnnotationLayerList.test.jsx} (98%) rename superset-frontend/src/{views/CRUD/annotationlayers/AnnotationLayersList.tsx => pages/AnnotationLayerList/index.tsx} (98%) rename superset-frontend/src/{views/CRUD/annotation => pages/AnnotationList}/AnnotationList.test.jsx (98%) rename superset-frontend/src/{views/CRUD/annotation/AnnotationList.tsx => pages/AnnotationList/index.tsx} (98%) rename superset-frontend/src/{explore/ExplorePage.tsx => pages/Chart/index.tsx} (89%) rename superset-frontend/src/{views/CRUD/csstemplates/CssTemplatesList.test.jsx => pages/CssTemplateList/CssTemplateList.test.jsx} (98%) rename superset-frontend/src/{views/CRUD/csstemplates/CssTemplatesList.tsx => pages/CssTemplateList/index.tsx} (98%) rename superset-frontend/src/{dashboard/containers/DashboardRoute.tsx => pages/Dashboard/index.tsx} (93%) rename superset-frontend/src/{views/CRUD/dashboard => pages/DashboardList}/DashboardList.test.jsx (99%) rename superset-frontend/src/{views/CRUD/dashboard/DashboardList.tsx => pages/DashboardList/index.tsx} (99%) rename superset-frontend/src/{views/CRUD/data/database => pages/DatabaseList}/DatabaseList.test.jsx (99%) rename superset-frontend/src/{views/CRUD/data/database/DatabaseList.tsx => pages/DatabaseList/index.tsx} (99%) rename superset-frontend/src/{views/CRUD/data/dataset/AddDataset/AddDataset.test.tsx => pages/DatasetCreation/DatasetCreation.test.tsx} (96%) rename superset-frontend/src/{views/CRUD/data/dataset/AddDataset => pages/DatasetCreation}/index.tsx (86%) rename superset-frontend/src/{views/CRUD/data/dataset => pages/DatasetList}/DatasetList.test.tsx (99%) rename superset-frontend/src/{views/CRUD/data/dataset/DatasetList.tsx => pages/DatasetList/index.tsx} (99%) rename superset-frontend/src/{views/CRUD/alert/ExecutionLog.test.jsx => pages/ExecutionLogList/ExecutionLogList.test.jsx} (98%) rename superset-frontend/src/{views/CRUD/alert/ExecutionLog.tsx => pages/ExecutionLogList/index.tsx} (98%) rename superset-frontend/src/{views/CRUD/welcome/Welcome.test.tsx => pages/Home/Home.test.tsx} (99%) rename superset-frontend/src/{views/CRUD/welcome/Welcome.tsx => pages/Home/index.tsx} (97%) rename superset-frontend/src/{views/CRUD/data/query/QueryList.test.tsx => pages/QueryHistoryList/QueryHistoryList.test.tsx} (98%) rename superset-frontend/src/{views/CRUD/data/query/QueryList.tsx => pages/QueryHistoryList/index.tsx} (99%) rename superset-frontend/src/{views/CRUD/data/savedquery => pages/SavedQueryList}/SavedQueryList.test.jsx (99%) rename superset-frontend/src/{views/CRUD/data/savedquery/SavedQueryList.tsx => pages/SavedQueryList/index.tsx} (99%) rename superset-frontend/src/{views/CRUD/tags/TagList.tsx => pages/Tags/index.tsx} (99%) rename superset-frontend/src/{pages/ChartList => views/CRUD/chart}/ChartCard.tsx (100%) diff --git a/superset-frontend/src/views/CRUD/alert/AlertList.test.jsx b/superset-frontend/src/pages/AlertReportList/AlertReportList.test.jsx similarity index 98% rename from superset-frontend/src/views/CRUD/alert/AlertList.test.jsx rename to superset-frontend/src/pages/AlertReportList/AlertReportList.test.jsx index d5b4d24150..492b63aa34 100644 --- a/superset-frontend/src/views/CRUD/alert/AlertList.test.jsx +++ b/superset-frontend/src/pages/AlertReportList/AlertReportList.test.jsx @@ -26,7 +26,7 @@ import waitForComponentToPaint from 'spec/helpers/waitForComponentToPaint'; import { Switch } from 'src/components/Switch'; import ListView from 'src/components/ListView'; import SubMenu from 'src/views/components/SubMenu'; -import AlertList from 'src/views/CRUD/alert/AlertList'; +import AlertList from 'src/pages/AlertReportList'; import IndeterminateCheckbox from 'src/components/IndeterminateCheckbox'; import { act } from 'react-dom/test-utils'; diff --git a/superset-frontend/src/views/CRUD/alert/AlertList.tsx b/superset-frontend/src/pages/AlertReportList/index.tsx similarity index 99% rename from superset-frontend/src/views/CRUD/alert/AlertList.tsx rename to superset-frontend/src/pages/AlertReportList/index.tsx index 1c34167652..c4a35435a0 100644 --- a/superset-frontend/src/views/CRUD/alert/AlertList.tsx +++ b/superset-frontend/src/pages/AlertReportList/index.tsx @@ -52,8 +52,8 @@ import { import { createErrorHandler, createFetchRelated } from 'src/views/CRUD/utils'; import { isUserAdmin } from 'src/dashboard/util/permissionUtils'; import Owner from 'src/types/Owner'; -import AlertReportModal from './AlertReportModal'; -import { AlertObject, AlertState } from './types'; +import AlertReportModal from 'src/views/CRUD/alert/AlertReportModal'; +import { AlertObject, AlertState } from 'src/views/CRUD/alert/types'; const extensionsRegistry = getExtensionsRegistry(); diff --git a/superset-frontend/src/views/CRUD/allentities/AllEntities.tsx b/superset-frontend/src/pages/AllEntities/index.tsx similarity index 97% rename from superset-frontend/src/views/CRUD/allentities/AllEntities.tsx rename to superset-frontend/src/pages/AllEntities/index.tsx index 995c12734c..de9df56e9f 100644 --- a/superset-frontend/src/views/CRUD/allentities/AllEntities.tsx +++ b/superset-frontend/src/pages/AllEntities/index.tsx @@ -24,7 +24,7 @@ import AsyncSelect from 'src/components/Select/AsyncSelect'; import { SelectValue } from 'antd/lib/select'; import { loadTags } from 'src/components/Tags/utils'; import { getValue } from 'src/components/Select/utils'; -import AllEntitiesTable from './AllEntitiesTable'; +import AllEntitiesTable from 'src/views/CRUD/allentities/AllEntitiesTable'; const AllEntitiesContainer = styled.div` ${({ theme }) => ` diff --git a/superset-frontend/src/views/CRUD/annotationlayers/AnnotationLayersList.test.jsx b/superset-frontend/src/pages/AnnotationLayerList/AnnotationLayerList.test.jsx similarity index 98% rename from superset-frontend/src/views/CRUD/annotationlayers/AnnotationLayersList.test.jsx rename to superset-frontend/src/pages/AnnotationLayerList/AnnotationLayerList.test.jsx index 541fd03555..d3efb1f8be 100644 --- a/superset-frontend/src/views/CRUD/annotationlayers/AnnotationLayersList.test.jsx +++ b/superset-frontend/src/pages/AnnotationLayerList/AnnotationLayerList.test.jsx @@ -23,7 +23,7 @@ import fetchMock from 'fetch-mock'; import { Provider } from 'react-redux'; import { styledMount as mount } from 'spec/helpers/theming'; -import AnnotationLayersList from 'src/views/CRUD/annotationlayers/AnnotationLayersList'; +import AnnotationLayersList from 'src/pages/AnnotationLayerList'; import AnnotationLayerModal from 'src/views/CRUD/annotationlayers/AnnotationLayerModal'; import SubMenu from 'src/views/components/SubMenu'; import ListView from 'src/components/ListView'; diff --git a/superset-frontend/src/views/CRUD/annotationlayers/AnnotationLayersList.tsx b/superset-frontend/src/pages/AnnotationLayerList/index.tsx similarity index 98% rename from superset-frontend/src/views/CRUD/annotationlayers/AnnotationLayersList.tsx rename to superset-frontend/src/pages/AnnotationLayerList/index.tsx index 3f4e1cd66c..9b30934ce4 100644 --- a/superset-frontend/src/views/CRUD/annotationlayers/AnnotationLayersList.tsx +++ b/superset-frontend/src/pages/AnnotationLayerList/index.tsx @@ -34,8 +34,8 @@ import ListView, { } from 'src/components/ListView'; import DeleteModal from 'src/components/DeleteModal'; import ConfirmStatusChange from 'src/components/ConfirmStatusChange'; -import AnnotationLayerModal from './AnnotationLayerModal'; -import { AnnotationLayerObject } from './types'; +import AnnotationLayerModal from 'src/views/CRUD/annotationlayers/AnnotationLayerModal'; +import { AnnotationLayerObject } from 'src/views/CRUD/annotationlayers/types'; const PAGE_SIZE = 25; const MOMENT_FORMAT = 'MMM DD, YYYY'; diff --git a/superset-frontend/src/views/CRUD/annotation/AnnotationList.test.jsx b/superset-frontend/src/pages/AnnotationList/AnnotationList.test.jsx similarity index 98% rename from superset-frontend/src/views/CRUD/annotation/AnnotationList.test.jsx rename to superset-frontend/src/pages/AnnotationList/AnnotationList.test.jsx index e4ddfb3695..26cd063d57 100644 --- a/superset-frontend/src/views/CRUD/annotation/AnnotationList.test.jsx +++ b/superset-frontend/src/pages/AnnotationList/AnnotationList.test.jsx @@ -23,7 +23,7 @@ import fetchMock from 'fetch-mock'; import { Provider } from 'react-redux'; import { styledMount as mount } from 'spec/helpers/theming'; -import AnnotationList from 'src/views/CRUD/annotation/AnnotationList'; +import AnnotationList from 'src/pages/AnnotationList'; import DeleteModal from 'src/components/DeleteModal'; import IndeterminateCheckbox from 'src/components/IndeterminateCheckbox'; import ListView from 'src/components/ListView'; diff --git a/superset-frontend/src/views/CRUD/annotation/AnnotationList.tsx b/superset-frontend/src/pages/AnnotationList/index.tsx similarity index 98% rename from superset-frontend/src/views/CRUD/annotation/AnnotationList.tsx rename to superset-frontend/src/pages/AnnotationList/index.tsx index f92bedd15d..dead2fc726 100644 --- a/superset-frontend/src/views/CRUD/annotation/AnnotationList.tsx +++ b/superset-frontend/src/pages/AnnotationList/index.tsx @@ -33,8 +33,8 @@ import withToasts from 'src/components/MessageToasts/withToasts'; import { useListViewResource } from 'src/views/CRUD/hooks'; import { createErrorHandler } from 'src/views/CRUD/utils'; -import { AnnotationObject } from './types'; -import AnnotationModal from './AnnotationModal'; +import { AnnotationObject } from 'src/views/CRUD/annotation/types'; +import AnnotationModal from 'src/views/CRUD/annotation/AnnotationModal'; const PAGE_SIZE = 25; diff --git a/superset-frontend/src/explore/ExplorePage.tsx b/superset-frontend/src/pages/Chart/index.tsx similarity index 89% rename from superset-frontend/src/explore/ExplorePage.tsx rename to superset-frontend/src/pages/Chart/index.tsx index cea43560af..fae85be59f 100644 --- a/superset-frontend/src/explore/ExplorePage.tsx +++ b/superset-frontend/src/pages/Chart/index.tsx @@ -34,13 +34,13 @@ import { URL_PARAMS } from 'src/constants'; import { getClientErrorObject } from 'src/utils/getClientErrorObject'; import getFormDataWithExtraFilters from 'src/dashboard/util/charts/getFormDataWithExtraFilters'; import { getAppliedFilterValues } from 'src/dashboard/util/activeDashboardFilters'; -import { getParsedExploreURLParams } from './exploreUtils/getParsedExploreURLParams'; -import { hydrateExplore } from './actions/hydrateExplore'; -import ExploreViewContainer from './components/ExploreViewContainer'; -import { ExploreResponsePayload, SaveActionType } from './types'; -import { fallbackExploreInitialData } from './fixtures'; -import { getItem, LocalStorageKeys } from '../utils/localStorageHelpers'; -import { getFormDataWithDashboardContext } from './controlUtils/getFormDataWithDashboardContext'; +import { getParsedExploreURLParams } from 'src/explore/exploreUtils/getParsedExploreURLParams'; +import { hydrateExplore } from 'src/explore/actions/hydrateExplore'; +import ExploreViewContainer from 'src/explore/components/ExploreViewContainer'; +import { ExploreResponsePayload, SaveActionType } from 'src/explore/types'; +import { fallbackExploreInitialData } from 'src/explore/fixtures'; +import { getItem, LocalStorageKeys } from 'src/utils/localStorageHelpers'; +import { getFormDataWithDashboardContext } from 'src/explore/controlUtils/getFormDataWithDashboardContext'; const isValidResult = (rv: JsonObject): boolean => rv?.result?.form_data && isDefined(rv?.result?.dataset?.id); diff --git a/superset-frontend/src/pages/ChartList/index.tsx b/superset-frontend/src/pages/ChartList/index.tsx index 9788d61e4a..1da3394fd2 100644 --- a/superset-frontend/src/pages/ChartList/index.tsx +++ b/superset-frontend/src/pages/ChartList/index.tsx @@ -70,7 +70,7 @@ import { GenericLink } from 'src/components/GenericLink/GenericLink'; import getBootstrapData from 'src/utils/getBootstrapData'; import Owner from 'src/types/Owner'; import { loadTags } from 'src/components/Tags/utils'; -import ChartCard from './ChartCard'; +import ChartCard from 'src/views/CRUD/chart/ChartCard'; const FlexRowContainer = styled.div` align-items: center; diff --git a/superset-frontend/src/views/CRUD/csstemplates/CssTemplatesList.test.jsx b/superset-frontend/src/pages/CssTemplateList/CssTemplateList.test.jsx similarity index 98% rename from superset-frontend/src/views/CRUD/csstemplates/CssTemplatesList.test.jsx rename to superset-frontend/src/pages/CssTemplateList/CssTemplateList.test.jsx index e0b6df9ddf..d513523a7e 100644 --- a/superset-frontend/src/views/CRUD/csstemplates/CssTemplatesList.test.jsx +++ b/superset-frontend/src/pages/CssTemplateList/CssTemplateList.test.jsx @@ -23,7 +23,7 @@ import { Provider } from 'react-redux'; import fetchMock from 'fetch-mock'; import { styledMount as mount } from 'spec/helpers/theming'; -import CssTemplatesList from 'src/views/CRUD/csstemplates/CssTemplatesList'; +import CssTemplatesList from 'src/pages/CssTemplateList'; import SubMenu from 'src/views/components/SubMenu'; import ListView from 'src/components/ListView'; import Filters from 'src/components/ListView/Filters'; diff --git a/superset-frontend/src/views/CRUD/csstemplates/CssTemplatesList.tsx b/superset-frontend/src/pages/CssTemplateList/index.tsx similarity index 98% rename from superset-frontend/src/views/CRUD/csstemplates/CssTemplatesList.tsx rename to superset-frontend/src/pages/CssTemplateList/index.tsx index 253a4f4cdf..4d678b0a32 100644 --- a/superset-frontend/src/views/CRUD/csstemplates/CssTemplatesList.tsx +++ b/superset-frontend/src/pages/CssTemplateList/index.tsx @@ -35,8 +35,8 @@ import ListView, { Filters, FilterOperator, } from 'src/components/ListView'; -import CssTemplateModal from './CssTemplateModal'; -import { TemplateObject } from './types'; +import CssTemplateModal from 'src/views/CRUD/csstemplates/CssTemplateModal'; +import { TemplateObject } from 'src/views/CRUD/csstemplates/types'; const PAGE_SIZE = 25; diff --git a/superset-frontend/src/dashboard/containers/DashboardRoute.tsx b/superset-frontend/src/pages/Dashboard/index.tsx similarity index 93% rename from superset-frontend/src/dashboard/containers/DashboardRoute.tsx rename to superset-frontend/src/pages/Dashboard/index.tsx index a382a28d45..6e694c1804 100644 --- a/superset-frontend/src/dashboard/containers/DashboardRoute.tsx +++ b/superset-frontend/src/pages/Dashboard/index.tsx @@ -18,7 +18,7 @@ */ import React, { FC } from 'react'; import { useParams } from 'react-router-dom'; -import { DashboardPage } from './DashboardPage'; +import { DashboardPage } from 'src/dashboard/containers/DashboardPage'; const DashboardRoute: FC = () => { const { idOrSlug } = useParams<{ idOrSlug: string }>(); diff --git a/superset-frontend/src/views/CRUD/dashboard/DashboardList.test.jsx b/superset-frontend/src/pages/DashboardList/DashboardList.test.jsx similarity index 99% rename from superset-frontend/src/views/CRUD/dashboard/DashboardList.test.jsx rename to superset-frontend/src/pages/DashboardList/DashboardList.test.jsx index e42ba92ff2..be04c32331 100644 --- a/superset-frontend/src/views/CRUD/dashboard/DashboardList.test.jsx +++ b/superset-frontend/src/pages/DashboardList/DashboardList.test.jsx @@ -32,7 +32,7 @@ import { QueryParamProvider } from 'use-query-params'; import { act } from 'react-dom/test-utils'; import ConfirmStatusChange from 'src/components/ConfirmStatusChange'; -import DashboardList from 'src/views/CRUD/dashboard/DashboardList'; +import DashboardList from 'src/pages/DashboardList'; import ListView from 'src/components/ListView'; import ListViewCard from 'src/components/ListViewCard'; import PropertiesModal from 'src/dashboard/components/PropertiesModal'; diff --git a/superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx b/superset-frontend/src/pages/DashboardList/index.tsx similarity index 99% rename from superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx rename to superset-frontend/src/pages/DashboardList/index.tsx index d6d192e22b..f8a2ea31aa 100644 --- a/superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx +++ b/superset-frontend/src/pages/DashboardList/index.tsx @@ -55,8 +55,8 @@ import { Dashboard as CRUDDashboard } from 'src/views/CRUD/types'; import CertifiedBadge from 'src/components/CertifiedBadge'; import { loadTags } from 'src/components/Tags/utils'; import getBootstrapData from 'src/utils/getBootstrapData'; -import DashboardCard from './DashboardCard'; -import { DashboardStatus } from './types'; +import DashboardCard from 'src/views/CRUD/dashboard/DashboardCard'; +import { DashboardStatus } from 'src/views/CRUD/dashboard/types'; const PAGE_SIZE = 25; const PASSWORDS_NEEDED_MESSAGE = t( diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseList.test.jsx b/superset-frontend/src/pages/DatabaseList/DatabaseList.test.jsx similarity index 99% rename from superset-frontend/src/views/CRUD/data/database/DatabaseList.test.jsx rename to superset-frontend/src/pages/DatabaseList/DatabaseList.test.jsx index f6fc0481f6..42cf1491d2 100644 --- a/superset-frontend/src/views/CRUD/data/database/DatabaseList.test.jsx +++ b/superset-frontend/src/pages/DatabaseList/DatabaseList.test.jsx @@ -24,7 +24,7 @@ import fetchMock from 'fetch-mock'; import { Provider } from 'react-redux'; import { styledMount as mount } from 'spec/helpers/theming'; -import DatabaseList from 'src/views/CRUD/data/database/DatabaseList'; +import DatabaseList from 'src/pages/DatabaseList'; import DatabaseModal from 'src/views/CRUD/data/database/DatabaseModal'; import DeleteModal from 'src/components/DeleteModal'; import SubMenu from 'src/views/components/SubMenu'; diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseList.tsx b/superset-frontend/src/pages/DatabaseList/index.tsx similarity index 99% rename from superset-frontend/src/views/CRUD/data/database/DatabaseList.tsx rename to superset-frontend/src/pages/DatabaseList/index.tsx index 00f207ba7a..c20c3b006b 100644 --- a/superset-frontend/src/views/CRUD/data/database/DatabaseList.tsx +++ b/superset-frontend/src/pages/DatabaseList/index.tsx @@ -40,9 +40,8 @@ import handleResourceExport from 'src/utils/export'; import { ExtensionConfigs } from 'src/views/components/types'; import { UserWithPermissionsAndRoles } from 'src/types/bootstrapTypes'; import type { MenuObjectProps } from 'src/types/bootstrapTypes'; -import DatabaseModal from './DatabaseModal'; - -import { DatabaseObject } from './types'; +import DatabaseModal from 'src/views/CRUD/data/database/DatabaseModal'; +import { DatabaseObject } from 'src/views/CRUD/data/database/types'; const PAGE_SIZE = 25; diff --git a/superset-frontend/src/views/CRUD/data/dataset/AddDataset/AddDataset.test.tsx b/superset-frontend/src/pages/DatasetCreation/DatasetCreation.test.tsx similarity index 96% rename from superset-frontend/src/views/CRUD/data/dataset/AddDataset/AddDataset.test.tsx rename to superset-frontend/src/pages/DatasetCreation/DatasetCreation.test.tsx index ea595c0f90..41b32965e8 100644 --- a/superset-frontend/src/views/CRUD/data/dataset/AddDataset/AddDataset.test.tsx +++ b/superset-frontend/src/pages/DatasetCreation/DatasetCreation.test.tsx @@ -18,7 +18,7 @@ */ import React from 'react'; import { render, screen } from 'spec/helpers/testing-library'; -import AddDataset from 'src/views/CRUD/data/dataset/AddDataset'; +import AddDataset from 'src/pages/DatasetCreation'; const mockHistoryPush = jest.fn(); jest.mock('react-router-dom', () => ({ diff --git a/superset-frontend/src/views/CRUD/data/dataset/AddDataset/index.tsx b/superset-frontend/src/pages/DatasetCreation/index.tsx similarity index 86% rename from superset-frontend/src/views/CRUD/data/dataset/AddDataset/index.tsx rename to superset-frontend/src/pages/DatasetCreation/index.tsx index 67b108ab36..18c180b2d3 100644 --- a/superset-frontend/src/views/CRUD/data/dataset/AddDataset/index.tsx +++ b/superset-frontend/src/pages/DatasetCreation/index.tsx @@ -19,13 +19,17 @@ import React, { useReducer, Reducer, useEffect, useState } from 'react'; import { useParams } from 'react-router-dom'; import { useDatasetsList } from 'src/views/CRUD/data/hooks'; -import Header from './Header'; -import EditPage from './EditDataset'; -import DatasetPanel from './DatasetPanel'; -import LeftPanel from './LeftPanel'; -import Footer from './Footer'; -import { DatasetActionType, DatasetObject, DSReducerActionType } from './types'; -import DatasetLayout from '../DatasetLayout'; +import Header from 'src/views/CRUD/data/dataset/AddDataset/Header'; +import EditPage from 'src/views/CRUD/data/dataset/AddDataset/EditDataset'; +import DatasetPanel from 'src/views/CRUD/data/dataset/AddDataset/DatasetPanel'; +import LeftPanel from 'src/views/CRUD/data/dataset/AddDataset/LeftPanel'; +import Footer from 'src/views/CRUD/data/dataset/AddDataset/Footer'; +import { + DatasetActionType, + DatasetObject, + DSReducerActionType, +} from 'src/views/CRUD/data/dataset/AddDataset/types'; +import DatasetLayout from 'src/views/CRUD/data/dataset/DatasetLayout'; type Schema = { schema: string; diff --git a/superset-frontend/src/views/CRUD/data/dataset/DatasetList.test.tsx b/superset-frontend/src/pages/DatasetList/DatasetList.test.tsx similarity index 99% rename from superset-frontend/src/views/CRUD/data/dataset/DatasetList.test.tsx rename to superset-frontend/src/pages/DatasetList/DatasetList.test.tsx index cf64ee6ac5..1ce9a7bc0f 100644 --- a/superset-frontend/src/views/CRUD/data/dataset/DatasetList.test.tsx +++ b/superset-frontend/src/pages/DatasetList/DatasetList.test.tsx @@ -27,7 +27,7 @@ import userEvent from '@testing-library/user-event'; import { QueryParamProvider } from 'use-query-params'; import * as featureFlags from 'src/featureFlags'; -import DatasetList from 'src/views/CRUD/data/dataset/DatasetList'; +import DatasetList from 'src/pages/DatasetList'; import ListView from 'src/components/ListView'; import Button from 'src/components/Button'; import IndeterminateCheckbox from 'src/components/IndeterminateCheckbox'; diff --git a/superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx b/superset-frontend/src/pages/DatasetList/index.tsx similarity index 99% rename from superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx rename to superset-frontend/src/pages/DatasetList/index.tsx index bc3342f69c..bdb2683ad4 100644 --- a/superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx +++ b/superset-frontend/src/pages/DatasetList/index.tsx @@ -64,8 +64,8 @@ import { SORT_BY, PASSWORDS_NEEDED_MESSAGE, CONFIRM_OVERWRITE_MESSAGE, -} from './constants'; -import DuplicateDatasetModal from './DuplicateDatasetModal'; +} from 'src/views/CRUD/data/dataset/constants'; +import DuplicateDatasetModal from 'src/views/CRUD/data/dataset/DuplicateDatasetModal'; const FlexRowContainer = styled.div` align-items: center; diff --git a/superset-frontend/src/views/CRUD/alert/ExecutionLog.test.jsx b/superset-frontend/src/pages/ExecutionLogList/ExecutionLogList.test.jsx similarity index 98% rename from superset-frontend/src/views/CRUD/alert/ExecutionLog.test.jsx rename to superset-frontend/src/pages/ExecutionLogList/ExecutionLogList.test.jsx index 5029a2ccbe..157ac24d9e 100644 --- a/superset-frontend/src/views/CRUD/alert/ExecutionLog.test.jsx +++ b/superset-frontend/src/pages/ExecutionLogList/ExecutionLogList.test.jsx @@ -24,7 +24,7 @@ import thunk from 'redux-thunk'; import { styledMount as mount } from 'spec/helpers/theming'; import waitForComponentToPaint from 'spec/helpers/waitForComponentToPaint'; import ListView from 'src/components/ListView'; -import ExecutionLog from 'src/views/CRUD/alert/ExecutionLog'; +import ExecutionLog from 'src/pages/ExecutionLogList'; // store needed for withToasts(ExecutionLog) const mockStore = configureStore([thunk]); diff --git a/superset-frontend/src/views/CRUD/alert/ExecutionLog.tsx b/superset-frontend/src/pages/ExecutionLogList/index.tsx similarity index 98% rename from superset-frontend/src/views/CRUD/alert/ExecutionLog.tsx rename to superset-frontend/src/pages/ExecutionLogList/index.tsx index 61b801c1c0..48c1bde788 100644 --- a/superset-frontend/src/views/CRUD/alert/ExecutionLog.tsx +++ b/superset-frontend/src/pages/ExecutionLogList/index.tsx @@ -31,7 +31,7 @@ import { useListViewResource, useSingleViewResource, } from 'src/views/CRUD/hooks'; -import { AlertObject, LogObject } from './types'; +import { AlertObject, LogObject } from 'src/views/CRUD/alert/types'; const PAGE_SIZE = 25; diff --git a/superset-frontend/src/views/CRUD/welcome/Welcome.test.tsx b/superset-frontend/src/pages/Home/Home.test.tsx similarity index 99% rename from superset-frontend/src/views/CRUD/welcome/Welcome.test.tsx rename to superset-frontend/src/pages/Home/Home.test.tsx index dffe5acdd0..fd90d1624a 100644 --- a/superset-frontend/src/views/CRUD/welcome/Welcome.test.tsx +++ b/superset-frontend/src/pages/Home/Home.test.tsx @@ -24,7 +24,7 @@ import fetchMock from 'fetch-mock'; import { act } from 'react-dom/test-utils'; import configureStore from 'redux-mock-store'; import * as featureFlags from 'src/featureFlags'; -import Welcome from 'src/views/CRUD/welcome/Welcome'; +import Welcome from 'src/pages/Home'; import { ReactWrapper } from 'enzyme'; import waitForComponentToPaint from 'spec/helpers/waitForComponentToPaint'; import { render, screen } from 'spec/helpers/testing-library'; diff --git a/superset-frontend/src/views/CRUD/welcome/Welcome.tsx b/superset-frontend/src/pages/Home/index.tsx similarity index 97% rename from superset-frontend/src/views/CRUD/welcome/Welcome.tsx rename to superset-frontend/src/pages/Home/index.tsx index 9da45615fb..fa1d3649c4 100644 --- a/superset-frontend/src/views/CRUD/welcome/Welcome.tsx +++ b/superset-frontend/src/pages/Home/index.tsx @@ -49,11 +49,11 @@ import { AntdSwitch } from 'src/components'; import getBootstrapData from 'src/utils/getBootstrapData'; import { TableTab } from 'src/views/CRUD/types'; import { canUserAccessSqlLab } from 'src/dashboard/util/permissionUtils'; -import { WelcomePageLastTab } from './types'; -import ActivityTable from './ActivityTable'; -import ChartTable from './ChartTable'; -import SavedQueries from './SavedQueries'; -import DashboardTable from './DashboardTable'; +import { WelcomePageLastTab } from 'src/views/CRUD/welcome/types'; +import ActivityTable from 'src/views/CRUD/welcome/ActivityTable'; +import ChartTable from 'src/views/CRUD/welcome/ChartTable'; +import SavedQueries from 'src/views/CRUD/welcome/SavedQueries'; +import DashboardTable from 'src/views/CRUD/welcome/DashboardTable'; const extensionsRegistry = getExtensionsRegistry(); diff --git a/superset-frontend/src/views/CRUD/data/query/QueryList.test.tsx b/superset-frontend/src/pages/QueryHistoryList/QueryHistoryList.test.tsx similarity index 98% rename from superset-frontend/src/views/CRUD/data/query/QueryList.test.tsx rename to superset-frontend/src/pages/QueryHistoryList/QueryHistoryList.test.tsx index be28d7e2df..540dd47ad8 100644 --- a/superset-frontend/src/views/CRUD/data/query/QueryList.test.tsx +++ b/superset-frontend/src/pages/QueryHistoryList/QueryHistoryList.test.tsx @@ -26,7 +26,7 @@ import { act } from 'react-dom/test-utils'; import waitForComponentToPaint from 'spec/helpers/waitForComponentToPaint'; import { styledMount as mount } from 'spec/helpers/theming'; -import QueryList from 'src/views/CRUD/data/query/QueryList'; +import QueryList from 'src/pages/QueryHistoryList'; import QueryPreviewModal from 'src/views/CRUD/data/query/QueryPreviewModal'; import { QueryObject } from 'src/views/CRUD/types'; import ListView from 'src/components/ListView'; diff --git a/superset-frontend/src/views/CRUD/data/query/QueryList.tsx b/superset-frontend/src/pages/QueryHistoryList/index.tsx similarity index 99% rename from superset-frontend/src/views/CRUD/data/query/QueryList.tsx rename to superset-frontend/src/pages/QueryHistoryList/index.tsx index ff7a268f20..ffed99d3ff 100644 --- a/superset-frontend/src/views/CRUD/data/query/QueryList.tsx +++ b/superset-frontend/src/pages/QueryHistoryList/index.tsx @@ -49,7 +49,7 @@ import { DATETIME_WITH_TIME_ZONE, TIME_WITH_MS } from 'src/constants'; import { QueryObject, QueryObjectColumns } from 'src/views/CRUD/types'; import Icons from 'src/components/Icons'; -import QueryPreviewModal from './QueryPreviewModal'; +import QueryPreviewModal from 'src/views/CRUD/data/query/QueryPreviewModal'; const PAGE_SIZE = 25; const SQL_PREVIEW_MAX_LINES = 4; diff --git a/superset-frontend/src/views/CRUD/data/savedquery/SavedQueryList.test.jsx b/superset-frontend/src/pages/SavedQueryList/SavedQueryList.test.jsx similarity index 99% rename from superset-frontend/src/views/CRUD/data/savedquery/SavedQueryList.test.jsx rename to superset-frontend/src/pages/SavedQueryList/SavedQueryList.test.jsx index afa0fcd6ae..8882d81491 100644 --- a/superset-frontend/src/views/CRUD/data/savedquery/SavedQueryList.test.jsx +++ b/superset-frontend/src/pages/SavedQueryList/SavedQueryList.test.jsx @@ -28,7 +28,7 @@ import userEvent from '@testing-library/user-event'; import { QueryParamProvider } from 'use-query-params'; import { act } from 'react-dom/test-utils'; import * as featureFlags from 'src/featureFlags'; -import SavedQueryList from 'src/views/CRUD/data/savedquery/SavedQueryList'; +import SavedQueryList from 'src/pages/SavedQueryList'; import SubMenu from 'src/views/components/SubMenu'; import ListView from 'src/components/ListView'; import Filters from 'src/components/ListView/Filters'; diff --git a/superset-frontend/src/views/CRUD/data/savedquery/SavedQueryList.tsx b/superset-frontend/src/pages/SavedQueryList/index.tsx similarity index 99% rename from superset-frontend/src/views/CRUD/data/savedquery/SavedQueryList.tsx rename to superset-frontend/src/pages/SavedQueryList/index.tsx index d3c96d4c30..5f57de5713 100644 --- a/superset-frontend/src/views/CRUD/data/savedquery/SavedQueryList.tsx +++ b/superset-frontend/src/pages/SavedQueryList/index.tsx @@ -53,7 +53,7 @@ import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags'; import ImportModelsModal from 'src/components/ImportModal/index'; import Icons from 'src/components/Icons'; import { BootstrapUser } from 'src/types/bootstrapTypes'; -import SavedQueryPreviewModal from './SavedQueryPreviewModal'; +import SavedQueryPreviewModal from 'src/views/CRUD/data/savedquery/SavedQueryPreviewModal'; const PAGE_SIZE = 25; const PASSWORDS_NEEDED_MESSAGE = t( diff --git a/superset-frontend/src/views/CRUD/tags/TagList.tsx b/superset-frontend/src/pages/Tags/index.tsx similarity index 99% rename from superset-frontend/src/views/CRUD/tags/TagList.tsx rename to superset-frontend/src/pages/Tags/index.tsx index 92028168f4..440e33bf9c 100644 --- a/superset-frontend/src/views/CRUD/tags/TagList.tsx +++ b/superset-frontend/src/pages/Tags/index.tsx @@ -40,8 +40,8 @@ import FacePile from 'src/components/FacePile'; import { Link } from 'react-router-dom'; import { deleteTags } from 'src/tags'; import { Tag as AntdTag } from 'antd'; -import { Tag } from '../types'; -import TagCard from './TagCard'; +import { Tag } from 'src/views/CRUD/types'; +import TagCard from 'src/views/CRUD/tags/TagCard'; const PAGE_SIZE = 25; diff --git a/superset-frontend/src/pages/ChartList/ChartCard.tsx b/superset-frontend/src/views/CRUD/chart/ChartCard.tsx similarity index 100% rename from superset-frontend/src/pages/ChartList/ChartCard.tsx rename to superset-frontend/src/views/CRUD/chart/ChartCard.tsx diff --git a/superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx b/superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx index 11a3e9afdb..08c18f7655 100644 --- a/superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx +++ b/superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx @@ -24,7 +24,7 @@ import { Link } from 'react-router-dom'; import ListViewCard from 'src/components/ListViewCard'; import SubMenu from 'src/views/components/SubMenu'; import { Dashboard, SavedQueryObject, TableTab } from 'src/views/CRUD/types'; -import { ActivityData, LoadingCards } from 'src/views/CRUD/welcome/Welcome'; +import { ActivityData, LoadingCards } from 'src/pages/Home'; import { CardContainer, CardStyles, diff --git a/superset-frontend/src/views/CRUD/welcome/ChartTable.tsx b/superset-frontend/src/views/CRUD/welcome/ChartTable.tsx index 52548e30b0..d0d4db4105 100644 --- a/superset-frontend/src/views/CRUD/welcome/ChartTable.tsx +++ b/superset-frontend/src/views/CRUD/welcome/ChartTable.tsx @@ -39,8 +39,8 @@ import { getFilterValues, PAGE_SIZE, } from 'src/views/CRUD/utils'; -import { LoadingCards } from 'src/views/CRUD/welcome/Welcome'; -import ChartCard from 'src/pages/ChartList/ChartCard'; +import { LoadingCards } from 'src/pages/Home'; +import ChartCard from 'src/views/CRUD/chart/ChartCard'; import Chart from 'src/types/Chart'; import handleResourceExport from 'src/utils/export'; import Loading from 'src/components/Loading'; diff --git a/superset-frontend/src/views/CRUD/welcome/DashboardTable.tsx b/superset-frontend/src/views/CRUD/welcome/DashboardTable.tsx index e4a31bdf4f..b38b0b8477 100644 --- a/superset-frontend/src/views/CRUD/welcome/DashboardTable.tsx +++ b/superset-frontend/src/views/CRUD/welcome/DashboardTable.tsx @@ -28,7 +28,7 @@ import { LocalStorageKeys, setItem, } from 'src/utils/localStorageHelpers'; -import { LoadingCards } from 'src/views/CRUD/welcome/Welcome'; +import { LoadingCards } from 'src/pages/Home'; import { CardContainer, createErrorHandler, diff --git a/superset-frontend/src/views/CRUD/welcome/SavedQueries.tsx b/superset-frontend/src/views/CRUD/welcome/SavedQueries.tsx index 4e323e633f..c7d43b0e4b 100644 --- a/superset-frontend/src/views/CRUD/welcome/SavedQueries.tsx +++ b/superset-frontend/src/views/CRUD/welcome/SavedQueries.tsx @@ -21,7 +21,7 @@ import { styled, SupersetClient, t, useTheme } from '@superset-ui/core'; import SyntaxHighlighter from 'react-syntax-highlighter/dist/cjs/light'; import sql from 'react-syntax-highlighter/dist/cjs/languages/hljs/sql'; import github from 'react-syntax-highlighter/dist/cjs/styles/hljs/github'; -import { LoadingCards } from 'src/views/CRUD/welcome/Welcome'; +import { LoadingCards } from 'src/pages/Home'; import { TableTab } from 'src/views/CRUD/types'; import withToasts from 'src/components/MessageToasts/withToasts'; import { AntdDropdown } from 'src/components'; diff --git a/superset-frontend/src/views/routes.test.tsx b/superset-frontend/src/views/routes.test.tsx index 2497dce15a..3b01288bfd 100644 --- a/superset-frontend/src/views/routes.test.tsx +++ b/superset-frontend/src/views/routes.test.tsx @@ -23,9 +23,7 @@ jest.mock('src/featureFlags', () => ({ ...jest.requireActual('src/featureFlags'), isFeatureEnabled: jest.fn().mockReturnValue(true), })); -jest.mock('src/views/CRUD/welcome/Welcome', () => () => ( -
-)); +jest.mock('src/pages/Home', () => () =>
); describe('isFrontendRoute', () => { it('returns true if a route matches', () => { diff --git a/superset-frontend/src/views/routes.tsx b/superset-frontend/src/views/routes.tsx index 633966ca74..1aaefaa538 100644 --- a/superset-frontend/src/views/routes.tsx +++ b/superset-frontend/src/views/routes.tsx @@ -20,100 +20,96 @@ import { FeatureFlag, isFeatureEnabled } from '@superset-ui/core'; import React, { lazy } from 'react'; // not lazy loaded since this is the home page. -import Welcome from 'src/views/CRUD/welcome/Welcome'; +import Home from 'src/pages/Home'; const ChartCreation = lazy( () => import(/* webpackChunkName: "ChartCreation" */ 'src/pages/ChartCreation'), ); -const AnnotationLayersList = lazy( + +const AnnotationLayerList = lazy( () => import( - /* webpackChunkName: "AnnotationLayersList" */ 'src/views/CRUD/annotationlayers/AnnotationLayersList' + /* webpackChunkName: "AnnotationLayerList" */ 'src/pages/AnnotationLayerList' ), ); -const AlertList = lazy( + +const AlertReportList = lazy( () => import( - /* webpackChunkName: "AlertList" */ 'src/views/CRUD/alert/AlertList' + /* webpackChunkName: "AlertReportList" */ 'src/pages/AlertReportList' ), ); + const AnnotationList = lazy( () => - import( - /* webpackChunkName: "AnnotationList" */ 'src/views/CRUD/annotation/AnnotationList' - ), + import(/* webpackChunkName: "AnnotationList" */ 'src/pages/AnnotationList'), ); + const ChartList = lazy( () => import(/* webpackChunkName: "ChartList" */ 'src/pages/ChartList'), ); -const CssTemplatesList = lazy( + +const CssTemplateList = lazy( () => import( - /* webpackChunkName: "CssTemplatesList" */ 'src/views/CRUD/csstemplates/CssTemplatesList' + /* webpackChunkName: "CssTemplateList" */ 'src/pages/CssTemplateList' ), ); + const DashboardList = lazy( () => - import( - /* webpackChunkName: "DashboardList" */ 'src/views/CRUD/dashboard/DashboardList' - ), + import(/* webpackChunkName: "DashboardList" */ 'src/pages/DashboardList'), ); -const DashboardRoute = lazy( - () => - import( - /* webpackChunkName: "DashboardRoute" */ 'src/dashboard/containers/DashboardRoute' - ), + +const Dashboard = lazy( + () => import(/* webpackChunkName: "Dashboard" */ 'src/pages/Dashboard'), ); + const DatabaseList = lazy( - () => - import( - /* webpackChunkName: "DatabaseList" */ 'src/views/CRUD/data/database/DatabaseList' - ), + () => import(/* webpackChunkName: "DatabaseList" */ 'src/pages/DatabaseList'), ); + const DatasetList = lazy( + () => import(/* webpackChunkName: "DatasetList" */ 'src/pages/DatasetList'), +); + +const DatasetCreation = lazy( () => import( - /* webpackChunkName: "DatasetList" */ 'src/views/CRUD/data/dataset/DatasetList' + /* webpackChunkName: "DatasetCreation" */ 'src/pages/DatasetCreation' ), ); -const AddDataset = lazy( +const ExecutionLogList = lazy( () => import( - /* webpackChunkName: "DatasetEditor" */ 'src/views/CRUD/data/dataset/AddDataset/index' + /* webpackChunkName: "ExecutionLogList" */ 'src/pages/ExecutionLogList' ), ); -const ExecutionLog = lazy( +const Chart = lazy( + () => import(/* webpackChunkName: "Chart" */ 'src/pages/Chart'), +); + +const QueryHistoryList = lazy( () => import( - /* webpackChunkName: "ExecutionLog" */ 'src/views/CRUD/alert/ExecutionLog' - ), -); -const ExplorePage = lazy( - () => import(/* webpackChunkName: "ExplorePage" */ 'src/explore/ExplorePage'), -); -const QueryList = lazy( - () => - import( - /* webpackChunkName: "QueryList" */ 'src/views/CRUD/data/query/QueryList' + /* webpackChunkName: "QueryHistoryList" */ 'src/pages/QueryHistoryList' ), ); + const SavedQueryList = lazy( () => - import( - /* webpackChunkName: "SavedQueryList" */ 'src/views/CRUD/data/savedquery/SavedQueryList' - ), + import(/* webpackChunkName: "SavedQueryList" */ 'src/pages/SavedQueryList'), ); -const AllEntitiesPage = lazy( - () => - import( - /* webpackChunkName: "AllEntities" */ 'src/views/CRUD/allentities/AllEntities' - ), + +const AllEntities = lazy( + () => import(/* webpackChunkName: "AllEntities" */ 'src/pages/AllEntities'), ); -const TagsPage = lazy( - () => import(/* webpackChunkName: "TagList" */ 'src/views/CRUD/tags/TagList'), + +const Tags = lazy( + () => import(/* webpackChunkName: "Tags" */ 'src/pages/Tags'), ); type Routes = { @@ -126,7 +122,7 @@ type Routes = { export const routes: Routes = [ { path: '/superset/welcome/', - Component: Welcome, + Component: Home, }, { path: '/dashboard/list/', @@ -134,7 +130,7 @@ export const routes: Routes = [ }, { path: '/superset/dashboard/:idOrSlug/', - Component: DashboardRoute, + Component: Dashboard, }, { path: '/chart/add', @@ -158,11 +154,11 @@ export const routes: Routes = [ }, { path: '/csstemplatemodelview/list/', - Component: CssTemplatesList, + Component: CssTemplateList, }, { path: '/annotationlayer/list/', - Component: AnnotationLayersList, + Component: AnnotationLayerList, }, { path: '/annotationlayer/:annotationLayerId/annotation/', @@ -170,56 +166,56 @@ export const routes: Routes = [ }, { path: '/superset/sqllab/history/', - Component: QueryList, + Component: QueryHistoryList, }, { path: '/alert/list/', - Component: AlertList, + Component: AlertReportList, }, { path: '/report/list/', - Component: AlertList, + Component: AlertReportList, props: { isReportEnabled: true, }, }, { path: '/alert/:alertId/log/', - Component: ExecutionLog, + Component: ExecutionLogList, }, { path: '/report/:alertId/log/', - Component: ExecutionLog, + Component: ExecutionLogList, props: { isReportEnabled: true, }, }, { path: '/explore/', - Component: ExplorePage, + Component: Chart, }, { path: '/superset/explore/p', - Component: ExplorePage, + Component: Chart, }, { path: '/dataset/add/', - Component: AddDataset, + Component: DatasetCreation, }, { path: '/dataset/:datasetId', - Component: AddDataset, + Component: DatasetCreation, }, ]; if (isFeatureEnabled(FeatureFlag.TAGGING_SYSTEM)) { routes.push({ path: '/superset/all_entities/', - Component: AllEntitiesPage, + Component: AllEntities, }); routes.push({ path: '/superset/tags/', - Component: TagsPage, + Component: Tags, }); }