You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by hu...@apache.org on 2021/05/19 17:51:13 UTC

[superset] branch hugh/bg-form updated (3a05e98 -> a77bf2c)

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

hugh pushed a change to branch hugh/bg-form
in repository https://gitbox.apache.org/repos/asf/superset.git.


    from 3a05e98  update big query schema
     add 1b47902  chore: Removes react-bootstrap and react-bootstrap-slider (#14641)
     add 4e6169e  chore: Adjust language picker theme to match other menus (#14644)
     add 9deb7aa  chore: Replaces Icon with Icons component - iteration 1 (#14469)
     add eb9dafc  chore: Register dynamic plugins and add feature checks (#14650)
     add ea96d95  Clear search (#14655)
     add fd8b2cb  fix: Fixes group by control icon colors (#14674)
     add 3ad8b54  fix: nav submenu dropdown styles (#14580)
     add 8528420  make config method optional (#14668)
     add 7a050c5  fix(explore): Fix column number calculation (#14665)
     add 9a9f093  Add max width (#14663)
     add b5e9854  Fix tooltip position (#14656)
     add 2320bd4  fix(sqllab): fix error message (#14651)
     add 971f588  feat: add SSL to new DB parameters (#14673)
     add 32f5f36  fix: Fixes email body when sharing a chart by email (#14664)
     add 5776dcb  Update docs for GLOBAL_ASYNC_QUERIES_TRANSPORT (#14558)
     add a7a011c  feat: Better return messages in SQL Editor (#14381)
     add 84e8dc7  feat(dashboard): View query of the chart in dashboard (#14667)
     add 90378ed  fix(explore): #10098 boolean filter not working (#14567)
     add 065b3f9  feat: redirect to /login when CSRF expired (#14675)
     add c3d1f10  feat: redirect 404/500 to static pages (#14677)
     add 5e95d46  fix: import dataset with extra; Vertica URI (#14698)
     add c2bd684  fix(Explore): fixes broken layout of tooltips (#14529)
     add a0881fb  Add filter_box full height (#14657)
     add be8c176  chore: Removes less from SliceAdder (#14448)
     add ec0a792  feat: Add Parameters fields to GET Database (#14653)
     add 67e3730  feat: Expanded Parameters for Mysql (#14680)
     add 4160e45  feat: Add headers for DatabaseModal (#14647)
     new a77bf2c  fix merge conflict

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CONTRIBUTING.md                                    |   2 +-
 docs/installation.rst                              |   2 +-
 .../cypress/integration/database/modal.test.ts     |   7 +-
 superset-frontend/package-lock.json                | 791 ++++++++-------------
 superset-frontend/package.json                     |  59 +-
 .../dashboard/components/SliceAdder_spec.jsx       |   4 +-
 .../components/ControlPanelsContainer_spec.tsx     |   7 +-
 ...n_spec.jsx => ExploreAdditionalActionsMenu.jsx} |  14 +-
 .../spec/javascripts/sqllab/QuerySearch_spec.jsx   |   5 +-
 .../spec/javascripts/sqllab/QueryTable_spec.jsx    |  25 +-
 .../spec/javascripts/sqllab/ResultSet_spec.jsx     |   5 +-
 .../spec/javascripts/sqllab/fixtures.ts            |  14 +
 .../src/SqlLab/components/QueryTable.jsx           |  13 +-
 .../src/SqlLab/components/ResultSet.tsx            | 150 +++-
 .../src/SqlLab/components/SouthPane/SouthPane.tsx  |  22 +-
 .../src/SqlLab/components/SouthPane/state.ts       |   1 +
 .../src/SqlLab/components/SqlEditor.jsx            |   1 +
 .../src/SqlLab/components/TableElement.jsx         |   2 +-
 superset-frontend/src/SqlLab/main.less             |   6 +-
 superset-frontend/src/assets/staticPages/404.html  |   2 +-
 superset-frontend/src/common/components/index.tsx  |  31 +-
 .../components/FilterableTable/FilterableTable.tsx |   4 +-
 superset-frontend/src/components/Label/index.tsx   |   1 +
 .../src/components/ListView/Filters/Search.tsx     |  10 +-
 .../src/components/Menu/LanguagePicker.test.tsx    |  25 +-
 .../src/components/Menu/LanguagePicker.tsx         |  97 +--
 .../src/components/Menu/Menu.test.tsx              |   2 +-
 superset-frontend/src/components/Menu/Menu.tsx     |  21 +-
 .../src/components/Menu/MenuRight.tsx              |  12 +-
 superset-frontend/src/components/Select/styles.tsx |   2 +-
 .../src/dashboard/components/AddSliceCard.jsx      |  69 +-
 .../src/dashboard/components/SliceAdder.jsx        |  66 +-
 .../components/SliceHeader/SliceHeader.test.tsx    |   1 +
 .../src/dashboard/components/SliceHeader/index.tsx |  15 +-
 .../components/SliceHeaderControls/index.jsx       |  19 +
 .../dashboard/components/gridComponents/Chart.jsx  |   1 +
 .../dashboard/stylesheets/builder-sidepane.less    |  57 --
 .../src/explore/components/ControlHeader.jsx       |  21 +-
 .../explore/components/ControlPanelsContainer.tsx  |  20 +-
 .../src/explore/components/ControlRow.tsx          |  16 +-
 .../src/explore/components/EmbedCodeButton.jsx     |   6 +-
 .../explore/components/ExploreActionButtons.tsx    |  38 +-
 .../ExploreAdditionalActionsMenu.test.tsx}         |  26 +-
 .../index.jsx                                      | 109 +--
 .../src/explore/components/ExploreChartPanel.jsx   |   6 +-
 .../explore/components/ExploreViewContainer.jsx    |  25 +-
 .../DndColumnSelectControl/DndSelectLabel.test.tsx |  12 +-
 .../DndColumnSelectControl/DndSelectLabel.tsx      |   4 +-
 .../controls/DndColumnSelectControl/Option.tsx     |   4 +-
 .../controls/FilterControl/AdhocFilter/index.js    |  13 +-
 .../FilterControl/AdhocFilterControl/index.jsx     |  15 +-
 ...AdhocFilterEditPopoverSimpleTabContent.test.jsx |  78 ++
 .../index.jsx                                      |  23 +-
 .../AdhocFilterOption/AdhocFilterOption.test.tsx   |  24 +-
 .../controls/MetricControl/MetricsControl.jsx      |  15 +-
 .../OptionControls/OptionControls.test.tsx         |  34 +-
 .../components/controls/OptionControls/index.tsx   |  34 +-
 .../explore/components/controls/ViewQueryModal.tsx | 112 +++
 .../src/explore/components/optionRenderers.tsx     |   5 +-
 superset-frontend/src/explore/constants.ts         |   5 +
 superset-frontend/src/explore/main.less            |  24 -
 .../components/SyntaxHighlighterCopy/index.tsx     |  10 +-
 .../CRUD/data/database/DatabaseModal/index.tsx     |  58 +-
 .../CRUD/data/database/DatabaseModal/styles.ts     |  77 +-
 superset-frontend/stylesheets/superset.less        |  21 -
 superset-frontend/webpack.config.js                |   1 -
 superset/app.py                                    |  20 +-
 .../sqllab/ExploreCtasResultsButton_spec.jsx       |  78 --
 .../SqlLab/components/ExploreCtasResultsButton.jsx | 131 ----
 superset/assets/version_info.json                  |   0
 superset/connectors/sqla/models.py                 |   4 +
 superset/databases/api.py                          |   2 +
 superset/databases/schemas.py                      |   4 +-
 superset/datasets/commands/export.py               |   2 +-
 superset/datasets/commands/importers/v1/utils.py   |   2 +-
 superset/datasets/schemas.py                       |   2 +-
 superset/db_engine_specs/base.py                   |  24 +-
 superset/db_engine_specs/mysql.py                  |  19 +-
 superset/db_engine_specs/postgres.py               |   2 +
 superset/models/core.py                            |  13 +
 superset/utils/core.py                             |   2 +
 superset/views/base.py                             |  30 +-
 superset/views/core.py                             |   2 +-
 superset/views/dynamic_plugins.py                  |  12 +
 tests/databases/api_tests.py                       | 139 +++-
 tests/datasets/commands_tests.py                   |   2 +-
 tests/db_engine_specs/mysql_tests.py               |   6 +
 tests/db_engine_specs/postgres_tests.py            |  11 +-
 .../base.py => tests/dynamic_plugins_tests.py      |  33 +-
 tests/fixtures/importexport.py                     |   2 +-
 tests/sqla_models_tests.py                         |  12 +-
 91 files changed, 1613 insertions(+), 1342 deletions(-)
 rename superset-frontend/spec/javascripts/explore/components/{DisplayQueryButton_spec.jsx => ExploreAdditionalActionsMenu.jsx} (81%)
 rename superset-frontend/src/explore/components/{DisplayQueryButton/DisplayQueryButton.test.tsx => ExploreAdditionalActionsMenu/ExploreAdditionalActionsMenu.test.tsx} (86%)
 rename superset-frontend/src/explore/components/{DisplayQueryButton => ExploreAdditionalActionsMenu}/index.jsx (51%)
 create mode 100644 superset-frontend/src/explore/components/controls/ViewQueryModal.tsx
 delete mode 100644 superset/assets/spec/javascripts/sqllab/ExploreCtasResultsButton_spec.jsx
 delete mode 100644 superset/assets/src/SqlLab/components/ExploreCtasResultsButton.jsx
 delete mode 100644 superset/assets/version_info.json
 copy superset/commands/base.py => tests/dynamic_plugins_tests.py (53%)

[superset] 01/01: fix merge conflict

Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hugh pushed a commit to branch hugh/bg-form
in repository https://gitbox.apache.org/repos/asf/superset.git

commit a77bf2c955f886ebd90c634f0a350dc320306058
Merge: 3a05e98 4160e45
Author: hughhhh <hu...@gmail.com>
AuthorDate: Wed May 19 13:48:39 2021 -0400

    fix merge conflict

 CONTRIBUTING.md                                    |   2 +-
 docs/installation.rst                              |   2 +-
 .../cypress/integration/database/modal.test.ts     |   7 +-
 superset-frontend/package-lock.json                | 791 ++++++++-------------
 superset-frontend/package.json                     |  59 +-
 .../dashboard/components/SliceAdder_spec.jsx       |   4 +-
 .../components/ControlPanelsContainer_spec.tsx     |   7 +-
 ...n_spec.jsx => ExploreAdditionalActionsMenu.jsx} |  14 +-
 .../spec/javascripts/sqllab/QuerySearch_spec.jsx   |   5 +-
 .../spec/javascripts/sqllab/QueryTable_spec.jsx    |  25 +-
 .../spec/javascripts/sqllab/ResultSet_spec.jsx     |   5 +-
 .../spec/javascripts/sqllab/fixtures.ts            |  14 +
 .../src/SqlLab/components/QueryTable.jsx           |  13 +-
 .../src/SqlLab/components/ResultSet.tsx            | 150 +++-
 .../src/SqlLab/components/SouthPane/SouthPane.tsx  |  22 +-
 .../src/SqlLab/components/SouthPane/state.ts       |   1 +
 .../src/SqlLab/components/SqlEditor.jsx            |   1 +
 .../src/SqlLab/components/TableElement.jsx         |   2 +-
 superset-frontend/src/SqlLab/main.less             |   6 +-
 superset-frontend/src/assets/staticPages/404.html  |   2 +-
 superset-frontend/src/common/components/index.tsx  |  31 +-
 .../components/FilterableTable/FilterableTable.tsx |   4 +-
 superset-frontend/src/components/Label/index.tsx   |   1 +
 .../src/components/ListView/Filters/Search.tsx     |  10 +-
 .../src/components/Menu/LanguagePicker.test.tsx    |  25 +-
 .../src/components/Menu/LanguagePicker.tsx         |  97 +--
 .../src/components/Menu/Menu.test.tsx              |   2 +-
 superset-frontend/src/components/Menu/Menu.tsx     |  21 +-
 .../src/components/Menu/MenuRight.tsx              |  12 +-
 superset-frontend/src/components/Select/styles.tsx |   2 +-
 .../src/dashboard/components/AddSliceCard.jsx      |  69 +-
 .../src/dashboard/components/SliceAdder.jsx        |  66 +-
 .../components/SliceHeader/SliceHeader.test.tsx    |   1 +
 .../src/dashboard/components/SliceHeader/index.tsx |  15 +-
 .../components/SliceHeaderControls/index.jsx       |  19 +
 .../dashboard/components/gridComponents/Chart.jsx  |   1 +
 .../dashboard/stylesheets/builder-sidepane.less    |  57 --
 .../src/explore/components/ControlHeader.jsx       |  21 +-
 .../explore/components/ControlPanelsContainer.tsx  |  20 +-
 .../src/explore/components/ControlRow.tsx          |  16 +-
 .../src/explore/components/EmbedCodeButton.jsx     |   6 +-
 .../explore/components/ExploreActionButtons.tsx    |  38 +-
 .../ExploreAdditionalActionsMenu.test.tsx}         |  26 +-
 .../index.jsx                                      | 109 +--
 .../src/explore/components/ExploreChartPanel.jsx   |   6 +-
 .../explore/components/ExploreViewContainer.jsx    |  25 +-
 .../DndColumnSelectControl/DndSelectLabel.test.tsx |  12 +-
 .../DndColumnSelectControl/DndSelectLabel.tsx      |   4 +-
 .../controls/DndColumnSelectControl/Option.tsx     |   4 +-
 .../controls/FilterControl/AdhocFilter/index.js    |  13 +-
 .../FilterControl/AdhocFilterControl/index.jsx     |  15 +-
 ...AdhocFilterEditPopoverSimpleTabContent.test.jsx |  78 ++
 .../index.jsx                                      |  23 +-
 .../AdhocFilterOption/AdhocFilterOption.test.tsx   |  24 +-
 .../controls/MetricControl/MetricsControl.jsx      |  15 +-
 .../OptionControls/OptionControls.test.tsx         |  34 +-
 .../components/controls/OptionControls/index.tsx   |  34 +-
 .../explore/components/controls/ViewQueryModal.tsx | 112 +++
 .../src/explore/components/optionRenderers.tsx     |   5 +-
 superset-frontend/src/explore/constants.ts         |   5 +
 superset-frontend/src/explore/main.less            |  24 -
 .../components/SyntaxHighlighterCopy/index.tsx     |  10 +-
 .../CRUD/data/database/DatabaseModal/index.tsx     |  58 +-
 .../CRUD/data/database/DatabaseModal/styles.ts     |  77 +-
 superset-frontend/stylesheets/superset.less        |  21 -
 superset-frontend/webpack.config.js                |   1 -
 superset/app.py                                    |  20 +-
 .../sqllab/ExploreCtasResultsButton_spec.jsx       |  78 --
 .../SqlLab/components/ExploreCtasResultsButton.jsx | 131 ----
 superset/assets/version_info.json                  |   0
 superset/connectors/sqla/models.py                 |   4 +
 superset/databases/api.py                          |   2 +
 superset/databases/schemas.py                      |   4 +-
 superset/datasets/commands/export.py               |   2 +-
 superset/datasets/commands/importers/v1/utils.py   |   2 +-
 superset/datasets/schemas.py                       |   2 +-
 superset/db_engine_specs/base.py                   |  24 +-
 superset/db_engine_specs/mysql.py                  |  19 +-
 superset/db_engine_specs/postgres.py               |   2 +
 superset/models/core.py                            |  13 +
 superset/utils/core.py                             |   2 +
 superset/views/base.py                             |  30 +-
 superset/views/core.py                             |   2 +-
 superset/views/dynamic_plugins.py                  |  12 +
 tests/databases/api_tests.py                       | 139 +++-
 tests/datasets/commands_tests.py                   |   2 +-
 tests/db_engine_specs/mysql_tests.py               |   6 +
 tests/db_engine_specs/postgres_tests.py            |  11 +-
 tests/dynamic_plugins_tests.py                     |  40 ++
 tests/fixtures/importexport.py                     |   2 +-
 tests/sqla_models_tests.py                         |  12 +-
 91 files changed, 1636 insertions(+), 1326 deletions(-)

diff --cc tests/databases/api_tests.py
index 2e1d9f7,7f53c57..4af5830
--- a/tests/databases/api_tests.py
+++ b/tests/databases/api_tests.py
@@@ -36,7 -36,7 +36,8 @@@ from superset import db, security_manag
  from superset.connectors.sqla.models import SqlaTable
  from superset.db_engine_specs.mysql import MySQLEngineSpec
  from superset.db_engine_specs.postgres import PostgresEngineSpec
 +from superset.db_engine_specs.bigquery import BigQueryEngineSpec
+ from superset.db_engine_specs.hana import HanaEngineSpec
  from superset.errors import SupersetError
  from superset.models.core import Database, ConfigurationMethod
  from superset.models.reports import ReportSchedule, ReportScheduleType
@@@ -1368,11 -1370,10 +1371,11 @@@ class TestDatabaseApi(SupersetTestCase)
      @mock.patch("superset.databases.api.get_available_engine_specs")
      @mock.patch("superset.databases.api.app")
      def test_available(self, app, get_available_engine_specs):
 -        app.config = {"PREFERRED_DATABASES": ["postgresql"]}
 +        app.config = {"PREFERRED_DATABASES": ["postgresql", "bigquery"]}
          get_available_engine_specs.return_value = [
-             MySQLEngineSpec,
              PostgresEngineSpec,
 +            BigQueryEngineSpec,
+             HanaEngineSpec,
          ]
  
          self.login(username="admin")
@@@ -1424,23 -1428,73 +1430,90 @@@
                      "preferred": True,
                      "sqlalchemy_uri_placeholder": "postgresql+psycopg2://user:password@host:port/dbname[?key=value&key=value...]",
                  },
 +                {
 +                    "engine": "bigquery",
 +                    "name": "Google BigQuery",
 +                    "parameters": {
 +                        "properties": {
 +                            "credentials_json": {
 +                                "additionalProperties": {},
 +                                "description": "credentials for bigquery",
 +                                "type": "object",
 +                            }
 +                        },
 +                        "type": "object",
 +                    },
 +                    "preferred": true,
 +                    "sqlalchemy_uri_placeholder": "bigquery://{project_id}",
 +                },
 +                {"engine": "mysql", "name": "MySQL", "preferred": False},
+                 {"engine": "hana", "name": "SAP HANA", "preferred": False},
+             ]
+         }
+ 
+     @mock.patch("superset.databases.api.get_available_engine_specs")
+     @mock.patch("superset.databases.api.app")
+     def test_available_with_mysql(self, app, get_available_engine_specs):
+         app.config = {"PREFERRED_DATABASES": ["mysql"]}
+         get_available_engine_specs.return_value = [
+             MySQLEngineSpec,
+             HanaEngineSpec,
+         ]
+ 
+         self.login(username="admin")
+         uri = "api/v1/database/available/"
+ 
+         rv = self.client.get(uri)
+         response = json.loads(rv.data.decode("utf-8"))
+         print(response)
+         assert rv.status_code == 200
+         assert response == {
+             "databases": [
+                 {
+                     "engine": "mysql",
+                     "name": "MySQL",
+                     "parameters": {
+                         "properties": {
+                             "database": {
+                                 "description": "Database name",
+                                 "type": "string",
+                             },
+                             "encryption": {
+                                 "description": "Use an encrypted connection to the database",
+                                 "type": "boolean",
+                             },
+                             "host": {
+                                 "description": "Hostname or IP address",
+                                 "type": "string",
+                             },
+                             "password": {
+                                 "description": "Password",
+                                 "nullable": True,
+                                 "type": "string",
+                             },
+                             "port": {
+                                 "description": "Database port",
+                                 "format": "int32",
+                                 "type": "integer",
+                             },
+                             "query": {
+                                 "additionalProperties": {},
+                                 "description": "Additional parameters",
+                                 "type": "object",
+                             },
+                             "username": {
+                                 "description": "Username",
+                                 "nullable": True,
+                                 "type": "string",
+                             },
+                         },
+                         "required": ["database", "host", "port", "username"],
+                         "type": "object",
+                     },
+                     "preferred": True,
+                     "sqlalchemy_uri_placeholder": "mysql://user:password@host:port/dbname[?key=value&key=value...]",
+                 },
+                 {"engine": "hana", "name": "SAP HANA", "preferred": False},
              ]
          }