mirror of https://github.com/apache/superset.git
refactor: Organizes the pages in their own folder (#23241)
This commit is contained in:
parent
6076457b90
commit
d16eda6e56
|
@ -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';
|
||||
|
|
@ -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();
|
||||
|
|
@ -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 }) => `
|
|
@ -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';
|
|
@ -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';
|
|
@ -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';
|
|
@ -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;
|
||||
|
|
@ -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);
|
|
@ -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;
|
||||
|
|
|
@ -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';
|
|
@ -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;
|
||||
|
|
@ -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 }>();
|
|
@ -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';
|
|
@ -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(
|
|
@ -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';
|
|
@ -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;
|
||||
|
|
@ -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', () => ({
|
|
@ -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;
|
|
@ -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';
|
|
@ -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;
|
|
@ -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]);
|
|
@ -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;
|
||||
|
|
@ -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';
|
|
@ -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();
|
||||
|
|
@ -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';
|
|
@ -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;
|
|
@ -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';
|
|
@ -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(
|
|
@ -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;
|
||||
|
|
@ -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,
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -23,9 +23,7 @@ jest.mock('src/featureFlags', () => ({
|
|||
...jest.requireActual<object>('src/featureFlags'),
|
||||
isFeatureEnabled: jest.fn().mockReturnValue(true),
|
||||
}));
|
||||
jest.mock('src/views/CRUD/welcome/Welcome', () => () => (
|
||||
<div data-test="mock-welcome" />
|
||||
));
|
||||
jest.mock('src/pages/Home', () => () => <div data-test="mock-home" />);
|
||||
|
||||
describe('isFrontendRoute', () => {
|
||||
it('returns true if a route matches', () => {
|
||||
|
|
|
@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue