diff --git a/superset-frontend/src/assets/images/empty-dataset.svg b/superset-frontend/src/assets/images/empty-dataset.svg
new file mode 100644
index 0000000000000..5ce1752545b29
--- /dev/null
+++ b/superset-frontend/src/assets/images/empty-dataset.svg
@@ -0,0 +1,38 @@
+
+
diff --git a/superset-frontend/src/assets/images/empty-table.svg b/superset-frontend/src/assets/images/empty-table.svg
new file mode 100644
index 0000000000000..c1062502f39dc
--- /dev/null
+++ b/superset-frontend/src/assets/images/empty-table.svg
@@ -0,0 +1,22 @@
+
+
diff --git a/superset-frontend/src/components/EmptyState/index.tsx b/superset-frontend/src/components/EmptyState/index.tsx
index 7ee69d7eea5e9..3f5d586cf8d92 100644
--- a/superset-frontend/src/components/EmptyState/index.tsx
+++ b/superset-frontend/src/components/EmptyState/index.tsx
@@ -37,6 +37,7 @@ export interface EmptyStateSmallProps {
export interface EmptyStateProps extends EmptyStateSmallProps {
buttonText?: ReactNode;
buttonAction?: React.MouseEventHandler;
+ className?: string;
}
export interface ImageContainerProps {
@@ -152,8 +153,9 @@ export const EmptyStateBig = ({
description,
buttonAction,
buttonText,
+ className,
}: EmptyStateProps) => (
-
+
diff --git a/superset-frontend/src/explore/components/ExploreChartHeader/index.jsx b/superset-frontend/src/explore/components/ExploreChartHeader/index.jsx
index fb85882f02337..9e1b27b24de46 100644
--- a/superset-frontend/src/explore/components/ExploreChartHeader/index.jsx
+++ b/superset-frontend/src/explore/components/ExploreChartHeader/index.jsx
@@ -119,9 +119,7 @@ export const ExploreChartHeader = ({
};
useEffect(() => {
- if (dashboardId) {
- fetchChartDashboardData();
- }
+ if (dashboardId) fetchChartDashboardData();
}, []);
const openPropertiesModal = () => {
diff --git a/superset-frontend/src/views/CRUD/data/dataset/AddDataset/AddDataset.test.tsx b/superset-frontend/src/views/CRUD/data/dataset/AddDataset/AddDataset.test.tsx
new file mode 100644
index 0000000000000..23c5c3b471a1e
--- /dev/null
+++ b/superset-frontend/src/views/CRUD/data/dataset/AddDataset/AddDataset.test.tsx
@@ -0,0 +1,42 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React from 'react';
+import { render, screen } from 'spec/helpers/testing-library';
+import AddDataset from 'src/views/CRUD/data/dataset/AddDataset';
+
+describe('AddDataset', () => {
+ it('renders a blank state AddDataset', () => {
+ render();
+
+ const blankeStateImgs = screen.getAllByRole('img', { name: /empty/i });
+
+ // Header
+ expect(screen.getByText(/header/i)).toBeVisible();
+ // Left panel
+ expect(blankeStateImgs[0]).toBeVisible();
+ expect(screen.getByText(/no database tables found/i)).toBeVisible();
+ // Database panel
+ expect(blankeStateImgs[1]).toBeVisible();
+ expect(screen.getByText(/select dataset source/i)).toBeVisible();
+ // Footer
+ expect(screen.getByText(/footer/i)).toBeVisible();
+
+ expect(blankeStateImgs.length).toBe(2);
+ });
+});
diff --git a/superset-frontend/src/views/CRUD/data/dataset/AddDataset/DatasetPanel/DatasetPanel.test.tsx b/superset-frontend/src/views/CRUD/data/dataset/AddDataset/DatasetPanel/DatasetPanel.test.tsx
new file mode 100644
index 0000000000000..b03b7cad92a63
--- /dev/null
+++ b/superset-frontend/src/views/CRUD/data/dataset/AddDataset/DatasetPanel/DatasetPanel.test.tsx
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React from 'react';
+import { render, screen } from 'spec/helpers/testing-library';
+import DatasetPanel from 'src/views/CRUD/data/dataset/AddDataset/DatasetPanel';
+
+describe('DatasetPanel', () => {
+ it('renders a blank state DatasetPanel', () => {
+ render();
+
+ const blankDatasetImg = screen.getByRole('img', { name: /empty/i });
+ const blankDatasetTitle = screen.getByText(/select dataset source/i);
+ const blankDatasetDescription = screen.getByText(
+ /datasets can be created from database tables or sql queries\. select a database table to the left or to open sql lab\. from there you can save the query as a dataset\./i,
+ );
+ const sqlLabLink = screen.getByRole('button', {
+ name: /create dataset from sql query/i,
+ });
+
+ expect(blankDatasetImg).toBeVisible();
+ expect(blankDatasetTitle).toBeVisible();
+ expect(blankDatasetDescription).toBeVisible();
+ expect(sqlLabLink).toBeVisible();
+ });
+});
diff --git a/superset-frontend/src/views/CRUD/data/dataset/AddDataset/DatasetPanel/index.tsx b/superset-frontend/src/views/CRUD/data/dataset/AddDataset/DatasetPanel/index.tsx
new file mode 100644
index 0000000000000..294637a6f7b50
--- /dev/null
+++ b/superset-frontend/src/views/CRUD/data/dataset/AddDataset/DatasetPanel/index.tsx
@@ -0,0 +1,55 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React from 'react';
+import { t, styled } from '@superset-ui/core';
+import { EmptyStateBig } from 'src/components/EmptyState';
+
+const StyledEmptyStateBig = styled(EmptyStateBig)`
+ p {
+ width: ${({ theme }) => theme.gridUnit * 115}px;
+ }
+`;
+
+const renderDescription = () => (
+ <>
+ {t(
+ 'Datasets can be created from database tables or SQL queries. Select a database table to the left or ',
+ )}
+ {
+ window.location.href = `/superset/sqllab`;
+ }}
+ tabIndex={0}
+ >
+ {t('create dataset from SQL query')}
+
+ {t(' to open SQL Lab. From there you can save the query as a dataset.')}
+ >
+);
+
+export default function DatasetPanel() {
+ return (
+
+ );
+}
diff --git a/superset-frontend/src/views/CRUD/data/dataset/DatasetPage/DatasetPanel/index.tsx b/superset-frontend/src/views/CRUD/data/dataset/AddDataset/Footer/Footer.test.tsx
similarity index 74%
rename from superset-frontend/src/views/CRUD/data/dataset/DatasetPage/DatasetPanel/index.tsx
rename to superset-frontend/src/views/CRUD/data/dataset/AddDataset/Footer/Footer.test.tsx
index 9fe93b8fb5888..bbff68c88da72 100644
--- a/superset-frontend/src/views/CRUD/data/dataset/DatasetPage/DatasetPanel/index.tsx
+++ b/superset-frontend/src/views/CRUD/data/dataset/AddDataset/Footer/Footer.test.tsx
@@ -17,7 +17,13 @@
* under the License.
*/
import React from 'react';
+import { render, screen } from 'spec/helpers/testing-library';
+import Footer from 'src/views/CRUD/data/dataset/AddDataset/Footer';
-export default function DatasetPanel() {
- return
Dataset Panel
;
-}
+describe('Footer', () => {
+ it('renders a blank state Footer', () => {
+ render();
+
+ expect(screen.getByText(/footer/i)).toBeVisible();
+ });
+});
diff --git a/superset-frontend/src/views/CRUD/data/dataset/DatasetPage/Footer/index.tsx b/superset-frontend/src/views/CRUD/data/dataset/AddDataset/Footer/index.tsx
similarity index 100%
rename from superset-frontend/src/views/CRUD/data/dataset/DatasetPage/Footer/index.tsx
rename to superset-frontend/src/views/CRUD/data/dataset/AddDataset/Footer/index.tsx
diff --git a/superset-frontend/src/views/CRUD/data/dataset/AddDataset/Header/Header.test.tsx b/superset-frontend/src/views/CRUD/data/dataset/AddDataset/Header/Header.test.tsx
new file mode 100644
index 0000000000000..c913dbc86afcd
--- /dev/null
+++ b/superset-frontend/src/views/CRUD/data/dataset/AddDataset/Header/Header.test.tsx
@@ -0,0 +1,29 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React from 'react';
+import { render, screen } from 'spec/helpers/testing-library';
+import Header from 'src/views/CRUD/data/dataset/AddDataset/Header';
+
+describe('Header', () => {
+ it('renders a blank state Header', () => {
+ render();
+
+ expect(screen.getByText(/header/i)).toBeVisible();
+ });
+});
diff --git a/superset-frontend/src/views/CRUD/data/dataset/DatasetPage/Header/index.tsx b/superset-frontend/src/views/CRUD/data/dataset/AddDataset/Header/index.tsx
similarity index 100%
rename from superset-frontend/src/views/CRUD/data/dataset/DatasetPage/Header/index.tsx
rename to superset-frontend/src/views/CRUD/data/dataset/AddDataset/Header/index.tsx
diff --git a/superset-frontend/src/views/CRUD/data/dataset/AddDataset/LeftPanel/LeftPanel.test.tsx b/superset-frontend/src/views/CRUD/data/dataset/AddDataset/LeftPanel/LeftPanel.test.tsx
new file mode 100644
index 0000000000000..9fdb1aee8f55b
--- /dev/null
+++ b/superset-frontend/src/views/CRUD/data/dataset/AddDataset/LeftPanel/LeftPanel.test.tsx
@@ -0,0 +1,31 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React from 'react';
+import { render, screen } from 'spec/helpers/testing-library';
+import LeftPanel from 'src/views/CRUD/data/dataset/AddDataset/LeftPanel';
+
+describe('LeftPanel', () => {
+ it('renders a blank state LeftPanel', () => {
+ render();
+
+ expect(screen.getByRole('img', { name: /empty/i })).toBeVisible();
+ expect(screen.getByText(/no database tables found/i)).toBeVisible();
+ expect(screen.getByText(/try selecting a different schema/i)).toBeVisible();
+ });
+});
diff --git a/superset-frontend/src/views/CRUD/data/dataset/DatasetPage/LeftPanel/index.tsx b/superset-frontend/src/views/CRUD/data/dataset/AddDataset/LeftPanel/index.tsx
similarity index 74%
rename from superset-frontend/src/views/CRUD/data/dataset/DatasetPage/LeftPanel/index.tsx
rename to superset-frontend/src/views/CRUD/data/dataset/AddDataset/LeftPanel/index.tsx
index 5ffb6a12c9ce0..908cf1a83311c 100644
--- a/superset-frontend/src/views/CRUD/data/dataset/DatasetPage/LeftPanel/index.tsx
+++ b/superset-frontend/src/views/CRUD/data/dataset/AddDataset/LeftPanel/index.tsx
@@ -17,7 +17,17 @@
* under the License.
*/
import React from 'react';
+import { t } from '@superset-ui/core';
+import { EmptyStateMedium } from 'src/components/EmptyState';
export default function LeftPanel() {
- return
Left Panel
;
+ return (
+ <>
+
+ >
+ );
}
diff --git a/superset-frontend/src/views/CRUD/data/dataset/AddDataset/RightPanel/RightPanel.test.tsx b/superset-frontend/src/views/CRUD/data/dataset/AddDataset/RightPanel/RightPanel.test.tsx
new file mode 100644
index 0000000000000..987d96abfa9eb
--- /dev/null
+++ b/superset-frontend/src/views/CRUD/data/dataset/AddDataset/RightPanel/RightPanel.test.tsx
@@ -0,0 +1,29 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React from 'react';
+import { render, screen } from 'spec/helpers/testing-library';
+import RightPanel from 'src/views/CRUD/data/dataset/AddDataset/RightPanel';
+
+describe('RightPanel', () => {
+ it('renders a blank state RightPanel', () => {
+ render();
+
+ expect(screen.getByText(/right panel/i)).toBeVisible();
+ });
+});
diff --git a/superset-frontend/src/views/CRUD/data/dataset/DatasetPage/RightPanel/index.tsx b/superset-frontend/src/views/CRUD/data/dataset/AddDataset/RightPanel/index.tsx
similarity index 100%
rename from superset-frontend/src/views/CRUD/data/dataset/DatasetPage/RightPanel/index.tsx
rename to superset-frontend/src/views/CRUD/data/dataset/AddDataset/RightPanel/index.tsx
diff --git a/superset-frontend/src/views/CRUD/data/dataset/DatasetPage/index.tsx b/superset-frontend/src/views/CRUD/data/dataset/AddDataset/index.tsx
similarity index 87%
rename from superset-frontend/src/views/CRUD/data/dataset/DatasetPage/index.tsx
rename to superset-frontend/src/views/CRUD/data/dataset/AddDataset/index.tsx
index 42de041fa03fd..677f3f52ae7f1 100644
--- a/superset-frontend/src/views/CRUD/data/dataset/DatasetPage/index.tsx
+++ b/superset-frontend/src/views/CRUD/data/dataset/AddDataset/index.tsx
@@ -17,13 +17,12 @@
* under the License.
*/
import React from 'react';
-// import React, { useReducer, Reducer } from 'react';
import Header from './Header';
import DatasetPanel from './DatasetPanel';
import LeftPanel from './LeftPanel';
-import RightPanel from './RightPanel';
import Footer from './Footer';
import { DatasetActionType, DatasetObject, DSReducerActionType } from './types';
+import DatasetLayout from '../DatasetLayout';
export function datasetReducer(
state: Partial | null,
@@ -61,7 +60,7 @@ export function datasetReducer(
}
}
-export default function DatasetPage() {
+export default function AddDataset() {
// this is commented out for now, but can be commented in as the component
// is built up. Uncomment the useReducer in imports too
// const [dataset, setDataset] = useReducer<
@@ -69,14 +68,11 @@ export default function DatasetPage() {
// >(datasetReducer, null);
return (
-
-
-
-
-
-
-
-
-
+
);
}
diff --git a/superset-frontend/src/views/CRUD/data/dataset/DatasetPage/types.tsx b/superset-frontend/src/views/CRUD/data/dataset/AddDataset/types.tsx
similarity index 100%
rename from superset-frontend/src/views/CRUD/data/dataset/DatasetPage/types.tsx
rename to superset-frontend/src/views/CRUD/data/dataset/AddDataset/types.tsx
diff --git a/superset-frontend/src/views/CRUD/data/dataset/DatasetLayout/DatasetLayout.test.tsx b/superset-frontend/src/views/CRUD/data/dataset/DatasetLayout/DatasetLayout.test.tsx
new file mode 100644
index 0000000000000..59c3ee3ed1535
--- /dev/null
+++ b/superset-frontend/src/views/CRUD/data/dataset/DatasetLayout/DatasetLayout.test.tsx
@@ -0,0 +1,70 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React from 'react';
+import { render, screen } from 'spec/helpers/testing-library';
+import DatasetLayout from 'src/views/CRUD/data/dataset/DatasetLayout';
+import Header from 'src/views/CRUD/data/dataset/AddDataset/Header';
+import LeftPanel from 'src/views/CRUD/data/dataset/AddDataset/LeftPanel';
+import DatasetPanel from 'src/views/CRUD/data/dataset/AddDataset/DatasetPanel';
+import RightPanel from 'src/views/CRUD/data/dataset/AddDataset/RightPanel';
+import Footer from 'src/views/CRUD/data/dataset/AddDataset/Footer';
+
+describe('DatasetLayout', () => {
+ it('renders nothing when no components are passed in', () => {
+ render();
+ const layoutWrapper = screen.getByTestId('dataset-layout-wrapper');
+
+ expect(layoutWrapper).toHaveTextContent('');
+ });
+
+ it('renders a Header when passed in', () => {
+ render();
+
+ expect(screen.getByText(/header/i)).toBeVisible();
+ });
+
+ it('renders a LeftPanel when passed in', () => {
+ render();
+
+ expect(screen.getByRole('img', { name: /empty/i })).toBeVisible();
+ expect(screen.getByText(/no database tables found/i)).toBeVisible();
+ });
+
+ it('renders a DatasetPanel when passed in', () => {
+ render();
+
+ const blankDatasetImg = screen.getByRole('img', { name: /empty/i });
+ const blankDatasetTitle = screen.getByText(/select dataset source/i);
+
+ expect(blankDatasetImg).toBeVisible();
+ expect(blankDatasetTitle).toBeVisible();
+ });
+
+ it('renders a RightPanel when passed in', () => {
+ render();
+
+ expect(screen.getByText(/right panel/i)).toBeVisible();
+ });
+
+ it('renders a Footer when passed in', () => {
+ render();
+
+ expect(screen.getByText(/footer/i)).toBeVisible();
+ });
+});
diff --git a/superset-frontend/src/views/CRUD/data/dataset/DatasetLayout/index.tsx b/superset-frontend/src/views/CRUD/data/dataset/DatasetLayout/index.tsx
new file mode 100644
index 0000000000000..8587b25a4a95c
--- /dev/null
+++ b/superset-frontend/src/views/CRUD/data/dataset/DatasetLayout/index.tsx
@@ -0,0 +1,72 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React, { ReactElement, JSXElementConstructor } from 'react';
+import {
+ StyledLayoutWrapper,
+ LeftColumn,
+ RightColumn,
+ OuterRow,
+ PanelRow,
+ FooterRow,
+ StyledHeader,
+ StyledLeftPanel,
+ StyledDatasetPanel,
+ StyledRightPanel,
+ StyledFooter,
+} from 'src/views/CRUD/data/dataset/styles';
+
+interface DatasetLayoutProps {
+ header?: ReactElement> | null;
+ leftPanel?: ReactElement> | null;
+ datasetPanel?: ReactElement> | null;
+ rightPanel?: ReactElement> | null;
+ footer?: ReactElement> | null;
+}
+
+export default function DatasetLayout({
+ header,
+ leftPanel,
+ datasetPanel,
+ rightPanel,
+ footer,
+}: DatasetLayoutProps) {
+ return (
+
+ {header && {header}}
+
+
+ {leftPanel && {leftPanel}}
+
+
+
+
+ {datasetPanel && (
+ {datasetPanel}
+ )}
+ {rightPanel && {rightPanel}}
+
+
+
+ {footer && {footer}}
+
+
+
+
+ );
+}
diff --git a/superset-frontend/src/views/CRUD/data/dataset/styles.ts b/superset-frontend/src/views/CRUD/data/dataset/styles.ts
new file mode 100644
index 0000000000000..8d9f771dce280
--- /dev/null
+++ b/superset-frontend/src/views/CRUD/data/dataset/styles.ts
@@ -0,0 +1,95 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { styled } from '@superset-ui/core';
+
+export const StyledLayoutWrapper = styled.div`
+ flex-grow: 1;
+ display: flex;
+ flex-direction: column;
+ background-color: ${({ theme }) => theme.colors.grayscale.light5};
+`;
+
+const Column = styled.div`
+ width: 100%;
+ height: 100%;
+ flex-direction: column;
+`;
+
+export const LeftColumn = styled(Column)`
+ width: ${({ theme }) => theme.gridUnit * 80}px;
+ height: auto;
+`;
+
+export const RightColumn = styled(Column)`
+ height: auto;
+ display: flex;
+ flex: 1 0 auto;
+ width: auto;
+`;
+
+const Row = styled.div`
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: row;
+`;
+
+export const OuterRow = styled(Row)`
+ flex: 1 0 auto;
+`;
+
+export const PanelRow = styled(Row)`
+ flex: 1 0 auto;
+ height: auto;
+`;
+
+export const FooterRow = styled(Row)`
+ flex: 0 0 auto;
+ height: ${({ theme }) => theme.gridUnit * 16}px;
+`;
+
+export const StyledHeader = styled.div`
+ flex: 0 0 auto;
+ height: ${({ theme }) => theme.gridUnit * 16}px;
+ border-bottom: 2px solid ${({ theme }) => theme.colors.grayscale.light2};
+ color: ${({ theme }) => theme.colors.error.base};
+`;
+
+export const StyledLeftPanel = styled.div`
+ width: ${({ theme }) => theme.gridUnit * 80}px;
+ height: 100%;
+ border-right: 1px solid ${({ theme }) => theme.colors.grayscale.light2};
+`;
+
+export const StyledDatasetPanel = styled.div`
+ width: 100%;
+`;
+
+export const StyledRightPanel = styled.div`
+ border-left: 1px solid ${({ theme }) => theme.colors.grayscale.light2};
+ color: ${({ theme }) => theme.colors.success.base};
+`;
+
+export const StyledFooter = styled.div`
+ height: ${({ theme }) => theme.gridUnit * 16}px;
+ width: 100%;
+ border-top: 1px solid ${({ theme }) => theme.colors.grayscale.light2};
+ border-bottom: 1px solid ${({ theme }) => theme.colors.grayscale.light2};
+ color: ${({ theme }) => theme.colors.info.base};
+`;
diff --git a/superset-frontend/src/views/routes.tsx b/superset-frontend/src/views/routes.tsx
index 732686838fa9f..d90feec116670 100644
--- a/superset-frontend/src/views/routes.tsx
+++ b/superset-frontend/src/views/routes.tsx
@@ -82,10 +82,10 @@ const DatasetList = lazy(
),
);
-const DatasetPage = lazy(
+const AddDataset = lazy(
() =>
import(
- /* webpackChunkName: "DatasetEditor" */ 'src/views/CRUD/data/dataset/DatasetPage/index'
+ /* webpackChunkName: "DatasetEditor" */ 'src/views/CRUD/data/dataset/AddDataset/index'
),
);
@@ -199,11 +199,11 @@ export const routes: Routes = [
},
{
path: '/dataset/add/',
- Component: DatasetPage,
+ Component: AddDataset,
},
{
path: '/dataset/:datasetId',
- Component: DatasetPage,
+ Component: AddDataset,
},
];