From e3ca6876fcc0c529d9246ef3c93d0485a6a2b8a2 Mon Sep 17 00:00:00 2001 From: "Michael S. Molina" Date: Fri, 4 Mar 2022 15:52:54 -0300 Subject: [PATCH 1/3] chore: Moves CRUD components to the Datasource component --- .../{CRUD => components/Datasource}/CollectionTable.test.jsx | 2 +- .../src/{CRUD => components/Datasource}/CollectionTable.tsx | 0 .../src/{CRUD => components/Datasource}/Field.test.tsx | 0 superset-frontend/src/{CRUD => components/Datasource}/Field.tsx | 0 .../src/{CRUD => components/Datasource}/Fieldset.tsx | 0 superset-frontend/src/{CRUD => components/Datasource}/crud.less | 0 superset-frontend/src/{CRUD => components/Datasource}/utils.js | 0 7 files changed, 1 insertion(+), 1 deletion(-) rename superset-frontend/src/{CRUD => components/Datasource}/CollectionTable.test.jsx (96%) rename superset-frontend/src/{CRUD => components/Datasource}/CollectionTable.tsx (100%) rename superset-frontend/src/{CRUD => components/Datasource}/Field.test.tsx (100%) rename superset-frontend/src/{CRUD => components/Datasource}/Field.tsx (100%) rename superset-frontend/src/{CRUD => components/Datasource}/Fieldset.tsx (100%) rename superset-frontend/src/{CRUD => components/Datasource}/crud.less (100%) rename superset-frontend/src/{CRUD => components/Datasource}/utils.js (100%) diff --git a/superset-frontend/src/CRUD/CollectionTable.test.jsx b/superset-frontend/src/components/Datasource/CollectionTable.test.jsx similarity index 96% rename from superset-frontend/src/CRUD/CollectionTable.test.jsx rename to superset-frontend/src/components/Datasource/CollectionTable.test.jsx index 3500a81ec706d..a5982e252af1a 100644 --- a/superset-frontend/src/CRUD/CollectionTable.test.jsx +++ b/superset-frontend/src/components/Datasource/CollectionTable.test.jsx @@ -19,8 +19,8 @@ import React from 'react'; import { shallow } from 'enzyme'; -import CollectionTable from 'src/CRUD/CollectionTable'; import mockDatasource from 'spec/fixtures/mockDatasource'; +import CollectionTable from './CollectionTable'; const props = { collection: mockDatasource['7__table'].columns, diff --git a/superset-frontend/src/CRUD/CollectionTable.tsx b/superset-frontend/src/components/Datasource/CollectionTable.tsx similarity index 100% rename from superset-frontend/src/CRUD/CollectionTable.tsx rename to superset-frontend/src/components/Datasource/CollectionTable.tsx diff --git a/superset-frontend/src/CRUD/Field.test.tsx b/superset-frontend/src/components/Datasource/Field.test.tsx similarity index 100% rename from superset-frontend/src/CRUD/Field.test.tsx rename to superset-frontend/src/components/Datasource/Field.test.tsx diff --git a/superset-frontend/src/CRUD/Field.tsx b/superset-frontend/src/components/Datasource/Field.tsx similarity index 100% rename from superset-frontend/src/CRUD/Field.tsx rename to superset-frontend/src/components/Datasource/Field.tsx diff --git a/superset-frontend/src/CRUD/Fieldset.tsx b/superset-frontend/src/components/Datasource/Fieldset.tsx similarity index 100% rename from superset-frontend/src/CRUD/Fieldset.tsx rename to superset-frontend/src/components/Datasource/Fieldset.tsx diff --git a/superset-frontend/src/CRUD/crud.less b/superset-frontend/src/components/Datasource/crud.less similarity index 100% rename from superset-frontend/src/CRUD/crud.less rename to superset-frontend/src/components/Datasource/crud.less diff --git a/superset-frontend/src/CRUD/utils.js b/superset-frontend/src/components/Datasource/utils.js similarity index 100% rename from superset-frontend/src/CRUD/utils.js rename to superset-frontend/src/components/Datasource/utils.js From bf841d23e7fa1a09d14f24bdaab19496b320f9a2 Mon Sep 17 00:00:00 2001 From: "Michael S. Molina" Date: Fri, 4 Mar 2022 16:14:24 -0300 Subject: [PATCH 2/3] Fixes imports --- .../src/components/Datasource/DatasourceEditor.jsx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/superset-frontend/src/components/Datasource/DatasourceEditor.jsx b/superset-frontend/src/components/Datasource/DatasourceEditor.jsx index 723d4971de28f..1b6de1c7a90df 100644 --- a/superset-frontend/src/components/Datasource/DatasourceEditor.jsx +++ b/superset-frontend/src/components/Datasource/DatasourceEditor.jsx @@ -36,21 +36,17 @@ import Label from 'src/components/Label'; import Loading from 'src/components/Loading'; import TableSelector from 'src/components/TableSelector'; import EditableTitle from 'src/components/EditableTitle'; - import { getClientErrorObject } from 'src/utils/getClientErrorObject'; - import CheckboxControl from 'src/explore/components/controls/CheckboxControl'; import TextControl from 'src/explore/components/controls/TextControl'; import TextAreaControl from 'src/explore/components/controls/TextAreaControl'; import SpatialControl from 'src/explore/components/controls/SpatialControl'; - -import CollectionTable from 'src/CRUD/CollectionTable'; -import Fieldset from 'src/CRUD/Fieldset'; -import Field from 'src/CRUD/Field'; - import withToasts from 'src/components/MessageToasts/withToasts'; import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags'; import Icons from 'src/components/Icons'; +import CollectionTable from './CollectionTable'; +import Fieldset from './Fieldset'; +import Field from './Field'; const DatasourceContainer = styled.div` .change-warning { From 90986c1aeeafb4e0500025c08957d8dfe206decf Mon Sep 17 00:00:00 2001 From: "Michael S. Molina" Date: Fri, 4 Mar 2022 16:28:47 -0300 Subject: [PATCH 3/3] Fixes less import --- superset-frontend/src/components/Datasource/crud.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/src/components/Datasource/crud.less b/superset-frontend/src/components/Datasource/crud.less index a12df7f4324a3..da9f2470da716 100644 --- a/superset-frontend/src/components/Datasource/crud.less +++ b/superset-frontend/src/components/Datasource/crud.less @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -@import '../assets/stylesheets/less/variables.less'; +@import '../../assets/stylesheets/less/variables.less'; .CRUD { .text-right {