This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 3d8857e  style: rename 'Source' top nav item to 'Data' (#10715)
3d8857e is described below

commit 3d8857ecc8efdde0f0445388105c2d81421236be
Author: Maxime Beauchemin <[email protected]>
AuthorDate: Sat Aug 29 18:09:47 2020 -0700

    style: rename 'Source' top nav item to 'Data' (#10715)
    
    * style: rename 'Source' top nav item to 'Data'
    
    * Fix tests
    
    * tables -> datasets
    
    * rename datasource -> dataset
    
    * lint
    
    * more renaming
    
    * use npm ci
---
 .github/workflows/bashlib.sh                       |  3 +-
 .github/workflows/superset-e2e.yml                 | 26 +++++++++++++-
 .../integration/chart_list/list_view.test.ts       |  2 +-
 .../spec/javascripts/components/Menu_spec.jsx      |  4 +--
 .../explore/components/DatasourceControl_spec.jsx  |  2 +-
 .../src/datasource/DatasourceEditor.jsx            |  6 ++--
 .../src/datasource/DatasourceModal.tsx             |  6 ++--
 superset-frontend/src/explore/controls.jsx         |  2 +-
 .../src/views/CRUD/chart/ChartList.tsx             |  4 +--
 .../src/views/CRUD/data/dataset/DatasetList.tsx    |  2 +-
 superset/app.py                                    | 42 +++++++++++-----------
 tests/security_tests.py                            |  4 +--
 12 files changed, 63 insertions(+), 40 deletions(-)

diff --git a/.github/workflows/bashlib.sh b/.github/workflows/bashlib.sh
index baabb17..8fd66e6 100644
--- a/.github/workflows/bashlib.sh
+++ b/.github/workflows/bashlib.sh
@@ -59,8 +59,7 @@ npm-install() {
   say "::group::Install npm packages"
   echo "npm: $(npm --version)"
   echo "node: $(node --version)"
-  rm -rf ./node_modules
-  npm install
+  npm ci
   say "::endgroup::"
 
   # cache-save npm
diff --git a/.github/workflows/superset-e2e.yml 
b/.github/workflows/superset-e2e.yml
index 78b759c..e15c7c6 100644
--- a/.github/workflows/superset-e2e.yml
+++ b/.github/workflows/superset-e2e.yml
@@ -37,17 +37,41 @@ jobs:
       uses: actions/[email protected]
       with:
         python-version: '3.7'
-    - name: Install dependencies
+    - name: OS dependencies
       uses: apache-superset/cached-dependencies@b90713b
       with:
         run: |
           apt-get-install
+    - name: Install python dependencies
+      uses: apache-superset/cached-dependencies@b90713b
+      with:
+        run: |
           pip-upgrade
           pip install -r requirements/testing.txt
+    - name: Setup postgres
+      uses: apache-superset/cached-dependencies@b90713b
+      with:
+        run: |
           setup-postgres
+    - name: Import test data
+      uses: apache-superset/cached-dependencies@b90713b
+      with:
+        run: |
           testdata
+    - name: Install npm dependencies
+      uses: apache-superset/cached-dependencies@b90713b
+      with:
+        run: |
           npm-install
+    - name: Build javascript packages
+      uses: apache-superset/cached-dependencies@b90713b
+      with:
+        run: |
           build-instrumented-assets
+    - name: Install cypress
+      uses: apache-superset/cached-dependencies@b90713b
+      with:
+        run: |
           cypress-install
     - name: Run Cypress
       uses: apache-superset/cached-dependencies@b90713b
diff --git 
a/superset-frontend/cypress-base/cypress/integration/chart_list/list_view.test.ts
 
b/superset-frontend/cypress-base/cypress/integration/chart_list/list_view.test.ts
index 10de8a6..3f68151 100644
--- 
a/superset-frontend/cypress-base/cypress/integration/chart_list/list_view.test.ts
+++ 
b/superset-frontend/cypress-base/cypress/integration/chart_list/list_view.test.ts
@@ -35,7 +35,7 @@ describe('chart list view', () => {
     cy.get('th[role="columnheader"]:nth-child(3)').contains(
       'Visualization Type',
     );
-    cy.get('th[role="columnheader"]:nth-child(4)').contains('Datasource');
+    cy.get('th[role="columnheader"]:nth-child(4)').contains('Dataset');
     cy.get('th[role="columnheader"]:nth-child(5)').contains('Modified By');
     cy.get('th[role="columnheader"]:nth-child(6)').contains('Last Modified');
     cy.get('th[role="columnheader"]:nth-child(7)').contains('Actions');
diff --git a/superset-frontend/spec/javascripts/components/Menu_spec.jsx 
b/superset-frontend/spec/javascripts/components/Menu_spec.jsx
index ff6cdb1..ab3bdb1 100644
--- a/superset-frontend/spec/javascripts/components/Menu_spec.jsx
+++ b/superset-frontend/spec/javascripts/components/Menu_spec.jsx
@@ -33,9 +33,9 @@ const defaultProps = {
         label: 'Sources',
         childs: [
           {
-            name: 'Tables',
+            name: 'Datasets',
             icon: 'fa-table',
-            label: 'Tables',
+            label: 'Datasets',
             url: '/tablemodelview/list/?_flt_1_is_sqllab_view=y',
           },
           '-',
diff --git 
a/superset-frontend/spec/javascripts/explore/components/DatasourceControl_spec.jsx
 
b/superset-frontend/spec/javascripts/explore/components/DatasourceControl_spec.jsx
index 7b09c11..3f7af15 100644
--- 
a/superset-frontend/spec/javascripts/explore/components/DatasourceControl_spec.jsx
+++ 
b/superset-frontend/spec/javascripts/explore/components/DatasourceControl_spec.jsx
@@ -27,7 +27,7 @@ import DatasourceControl from 
'src/explore/components/controls/DatasourceControl
 
 const defaultProps = {
   name: 'datasource',
-  label: 'Datasource',
+  label: 'Dataset',
   value: '1__table',
   datasource: {
     name: 'birth_names',
diff --git a/superset-frontend/src/datasource/DatasourceEditor.jsx 
b/superset-frontend/src/datasource/DatasourceEditor.jsx
index 4a36b90..c2c5dd1 100644
--- a/superset-frontend/src/datasource/DatasourceEditor.jsx
+++ b/superset-frontend/src/datasource/DatasourceEditor.jsx
@@ -488,7 +488,7 @@ export class DatasourceEditor extends React.PureComponent {
           fieldKey="default_endpoint"
           label={t('Default URL')}
           description={t(
-            'Default URL to redirect to when accessing from the datasource 
list page',
+            'Default URL to redirect to when accessing from the dataset list 
page',
           )}
           control={<TextControl />}
         />
@@ -547,7 +547,7 @@ export class DatasourceEditor extends React.PureComponent {
             fieldKey="sql"
             label={t('SQL')}
             description={t(
-              'When specifying SQL, the datasource acts as a view. ' +
+              'When specifying SQL, the dataset acts as a view. ' +
                 'Superset will use this statement as a subquery while grouping 
and filtering ' +
                 'on the generated parent queries.',
             )}
@@ -836,7 +836,7 @@ export class DatasourceEditor extends React.PureComponent {
                   <Alert bsStyle="warning">
                     <strong>{t('Be careful.')} </strong>
                     {t(
-                      'Changing these settings will affect all charts using 
this datasource, including charts owned by other people.',
+                      'Changing these settings will affect all charts using 
this dataset, including charts owned by other people.',
                     )}
                   </Alert>
                 </div>
diff --git a/superset-frontend/src/datasource/DatasourceModal.tsx 
b/superset-frontend/src/datasource/DatasourceModal.tsx
index 6af23b6..fec7d4d 100644
--- a/superset-frontend/src/datasource/DatasourceModal.tsx
+++ b/superset-frontend/src/datasource/DatasourceModal.tsx
@@ -116,8 +116,8 @@ const DatasourceModal: 
FunctionComponent<DatasourceModalProps> = ({
       >
         <div>
           <i className="fa fa-exclamation-triangle" />{' '}
-          {t(`The data source configuration exposed here
-                affects all the charts using this datasource.
+          {t(`The dataset configuration exposed here
+                affects all the charts using this dataset.
                 Be mindful that changing settings
                 here may affect other charts
                 in undesirable ways.`)}
@@ -142,7 +142,7 @@ const DatasourceModal: 
FunctionComponent<DatasourceModalProps> = ({
         <Modal.Title>
           <div>
             <span className="float-left">
-              {t('Datasource Editor for ')}
+              {t('Edit Dataset ')}
               <strong>{currentDatasource.table_name}</strong>
             </span>
           </div>
diff --git a/superset-frontend/src/explore/controls.jsx 
b/superset-frontend/src/explore/controls.jsx
index 07ca75a..046a6ed 100644
--- a/superset-frontend/src/explore/controls.jsx
+++ b/superset-frontend/src/explore/controls.jsx
@@ -197,7 +197,7 @@ export const controls = {
 
   datasource: {
     type: 'DatasourceControl',
-    label: t('Datasource'),
+    label: t('Dataset'),
     default: null,
     description: null,
     mapStateToProps: ({ datasource }) => ({
diff --git a/superset-frontend/src/views/CRUD/chart/ChartList.tsx 
b/superset-frontend/src/views/CRUD/chart/ChartList.tsx
index bf2fded..5406cfc 100644
--- a/superset-frontend/src/views/CRUD/chart/ChartList.tsx
+++ b/superset-frontend/src/views/CRUD/chart/ChartList.tsx
@@ -220,7 +220,7 @@ function ChartList(props: ChartListProps) {
             },
           },
         }: any) => <a href={dsUrl}>{dsNameTxt}</a>,
-        Header: t('Datasource'),
+        Header: t('Dataset'),
         accessor: 'datasource_name',
       },
       {
@@ -345,7 +345,7 @@ function ChartList(props: ChartListProps) {
         .map(k => ({ label: k, value: k })),
     },
     {
-      Header: t('Datasource'),
+      Header: t('Dataset'),
       id: 'datasource_id',
       input: 'select',
       operator: 'eq',
diff --git a/superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx 
b/superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx
index c11bac5..8ef6b7f 100644
--- a/superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx
+++ b/superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx
@@ -370,7 +370,7 @@ const DatasetList: FunctionComponent<DatasetListProps> = ({
         paginate: true,
       },
       {
-        Header: t('Datasource'),
+        Header: t('Database'),
         id: 'database',
         input: 'select',
         operator: 'rel_o_m',
diff --git a/superset/app.py b/superset/app.py
index 11cb004..4308932 100644
--- a/superset/app.py
+++ b/superset/app.py
@@ -209,20 +209,20 @@ class SupersetAppInitializer:
             "Databases",
             label=__("Databases"),
             icon="fa-database",
-            category="Sources",
-            category_label=__("Sources"),
+            category="Data",
+            category_label=__("Data"),
             category_icon="fa-database",
         )
         appbuilder.add_link(
-            "Tables",
-            label=__("Tables"),
+            "Datasets",
+            label=__("Datasets"),
             href="/tablemodelview/list/?_flt_1_is_sqllab_view=y",
             icon="fa-table",
-            category="Sources",
-            category_label=__("Sources"),
+            category="Data",
+            category_label=__("Data"),
             category_icon="fa-table",
         )
-        appbuilder.add_separator("Sources")
+        appbuilder.add_separator("Data")
         appbuilder.add_view(
             SliceModelView,
             "Charts",
@@ -332,8 +332,8 @@ class SupersetAppInitializer:
                 label=__("Upload a CSV"),
                 href="/csvtodatabaseview/form",
                 icon="fa-upload",
-                category="Sources",
-                category_label=__("Sources"),
+                category="Data",
+                category_label=__("Data"),
                 category_icon="fa-wrench",
             )
         try:
@@ -347,8 +347,8 @@ class SupersetAppInitializer:
                     label=__("Upload Excel"),
                     href="/exceltodatabaseview/form",
                     icon="fa-upload",
-                    category="Sources",
-                    category_label=__("Sources"),
+                    category="Data",
+                    category_label=__("Data"),
                     category_icon="fa-wrench",
                 )
         except ImportError:
@@ -418,13 +418,13 @@ class SupersetAppInitializer:
         # Conditionally setup Druid Views
         #
         if self.config["DRUID_IS_ACTIVE"]:
-            appbuilder.add_separator("Sources")
+            appbuilder.add_separator("Data")
             appbuilder.add_view(
                 DruidDatasourceModelView,
                 "Druid Datasources",
                 label=__("Druid Datasources"),
-                category="Sources",
-                category_label=__("Sources"),
+                category="Data",
+                category_label=__("Data"),
                 icon="fa-cube",
             )
             appbuilder.add_view(
@@ -432,8 +432,8 @@ class SupersetAppInitializer:
                 name="Druid Clusters",
                 label=__("Druid Clusters"),
                 icon="fa-cubes",
-                category="Sources",
-                category_label=__("Sources"),
+                category="Data",
+                category_label=__("Data"),
                 category_icon="fa-database",
             )
             appbuilder.add_view_no_menu(DruidMetricInlineView)
@@ -445,8 +445,8 @@ class SupersetAppInitializer:
                     "Scan New Datasources",
                     label=__("Scan New Datasources"),
                     href="/druid/scan_new_datasources/",
-                    category="Sources",
-                    category_label=__("Sources"),
+                    category="Data",
+                    category_label=__("Data"),
                     category_icon="fa-database",
                     icon="fa-refresh",
                 )
@@ -454,12 +454,12 @@ class SupersetAppInitializer:
                     "Refresh Druid Metadata",
                     label=__("Refresh Druid Metadata"),
                     href="/druid/refresh_datasources/",
-                    category="Sources",
-                    category_label=__("Sources"),
+                    category="Data",
+                    category_label=__("Data"),
                     category_icon="fa-database",
                     icon="fa-cog",
                 )
-            appbuilder.add_separator("Sources")
+            appbuilder.add_separator("Data")
 
     def init_app_in_ctx(self) -> None:
         """
diff --git a/tests/security_tests.py b/tests/security_tests.py
index fa87822..64c6f32 100644
--- a/tests/security_tests.py
+++ b/tests/security_tests.py
@@ -642,8 +642,8 @@ class TestRolePermission(SupersetTestCase):
         self.assertIn(("can_explore_json", "Superset"), perm_set)
         self.assertIn(("can_userinfo", "UserDBModelView"), perm_set)
         self.assert_can_menu("Databases", perm_set)
-        self.assert_can_menu("Tables", perm_set)
-        self.assert_can_menu("Sources", perm_set)
+        self.assert_can_menu("Datasets", perm_set)
+        self.assert_can_menu("Data", perm_set)
         self.assert_can_menu("Charts", perm_set)
         self.assert_can_menu("Dashboards", perm_set)
 

Reply via email to