You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by aa...@apache.org on 2022/09/01 18:05:20 UTC

[superset] branch arash.afghahi/sc-56572/database-connect-db-page-show-error-if-user created (now b3e76cc962)

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

aafghahi pushed a change to branch arash.afghahi/sc-56572/database-connect-db-page-show-error-if-user
in repository https://gitbox.apache.org/repos/asf/superset.git


      at b3e76cc962 fix connect issue

This branch includes the following new commits:

     new dc65632ec1 Merge branch 'master' of https://github.com/apache/superset
     new b3e76cc962 fix connect issue

The 2 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.



[superset] 01/02: Merge branch 'master' of https://github.com/apache/superset

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

aafghahi pushed a commit to branch arash.afghahi/sc-56572/database-connect-db-page-show-error-if-user
in repository https://gitbox.apache.org/repos/asf/superset.git

commit dc65632ec192f148349116563d50097bc55c1a0f
Merge: d4255b416f eb805682e2
Author: AAfghahi <ar...@gmail.com>
AuthorDate: Thu Sep 1 11:05:48 2022 -0400

    Merge branch 'master' of https://github.com/apache/superset

 RELEASING/README.md                                |  12 +-
 docs/docs/installation/alerts-reports.mdx          |   1 +
 requirements/development.txt                       |   2 +-
 setup.py                                           |   6 +-
 superset-embedded-sdk/README.md                    |   7 +-
 superset-embedded-sdk/src/const.ts                 |   4 +
 superset-embedded-sdk/src/index.ts                 |  21 +-
 .../src/Timeseries/Regular/Line/index.ts           |   2 +-
 .../SqlLab/components/SaveDatasetModal/index.tsx   |   7 +-
 superset-frontend/src/SqlLab/main.less             |   1 -
 .../components/ErrorMessage/ErrorAlert.test.tsx    |   6 -
 .../src/components/ErrorMessage/ErrorAlert.tsx     |  19 +-
 .../ErrorMessage/ErrorMessageWithStackTrace.tsx    |   3 -
 .../CRUD/data/database/DatabaseModal/index.tsx     |  34 +-
 superset/config.py                                 |   4 +-
 superset/connectors/sqla/models.py                 |   7 +-
 superset/databases/commands/update.py              |  34 +
 superset/datasets/commands/create.py               |  11 +-
 superset/datasets/commands/delete.py               |  24 -
 superset/models/core.py                            |   2 +-
 superset/security/manager.py                       | 638 ++++++++++----
 superset/utils/core.py                             |  34 +-
 tests/integration_tests/datasets/api_tests.py      |  13 +
 tests/integration_tests/email_tests.py             |  29 +-
 tests/integration_tests/security_tests.py          | 930 ++++++++++++++++-----
 tests/unit_tests/conftest.py                       |   3 +
 26 files changed, 1383 insertions(+), 471 deletions(-)


[superset] 02/02: fix connect issue

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

aafghahi pushed a commit to branch arash.afghahi/sc-56572/database-connect-db-page-show-error-if-user
in repository https://gitbox.apache.org/repos/asf/superset.git

commit b3e76cc962ce9bab6d2a9f0d9e6141993706a190
Author: AAfghahi <ar...@gmail.com>
AuthorDate: Thu Sep 1 14:04:57 2022 -0400

    fix connect issue
---
 .../src/views/CRUD/data/database/DatabaseModal/index.tsx      | 11 +++++++----
 .../src/views/CRUD/data/database/DatabaseModal/styles.ts      |  2 +-
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx
index a4451822af..4ce10ad601 100644
--- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx
+++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx
@@ -847,7 +847,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
 
   const renderModalFooter = () => {
     if (db) {
-      // if db show back + connenct
+      // if db show back + connect
       if (!hasConnectedDb || editNewDb) {
         return (
           <>
@@ -901,7 +901,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
       );
     }
 
-    return [];
+    return null;
   };
 
   const renderEditModalFooter = (db: Partial<DatabaseObject> | null) => (
@@ -1302,7 +1302,9 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
       </Modal>
     );
   }
-
+  const modalFooter = isEditMode
+    ? renderEditModalFooter(db)
+    : renderModalFooter();
   return useTabLayout ? (
     <Modal
       css={(theme: SupersetTheme) => [
@@ -1323,7 +1325,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
       title={
         <h4>{isEditMode ? t('Edit database') : t('Connect a database')}</h4>
       }
-      footer={isEditMode ? renderEditModalFooter(db) : renderModalFooter()}
+      footer={modalFooter}
     >
       <StyledStickyHeader>
         <TabHeader>
@@ -1509,6 +1511,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
       show={show}
       title={<h4>{t('Connect a database')}</h4>}
       footer={renderModalFooter()}
+      hideFooter={renderModalFooter() ? false : true}
     >
       {!isLoading && hasConnectedDb ? (
         <>
diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/styles.ts b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/styles.ts
index 9e085169af..af977a1bfe 100644
--- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/styles.ts
+++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/styles.ts
@@ -156,7 +156,7 @@ export const antDModalStyles = (theme: SupersetTheme) => css`
   }
 
   .ant-modal-body {
-    height: ${theme.gridUnit * 180.5}px;
+    height: ${theme.gridUnit * 188}px;
   }
 
   .ant-modal-footer {