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/06/27 00:59:54 UTC

[superset] 01/01: make alerts configurable

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

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

commit fc7e0d96afe44d836e2f837690b7f403b75d399e
Author: hughhhh <hu...@gmail.com>
AuthorDate: Sat Jun 26 17:58:53 2021 -0700

    make alerts configurable
---
 .../CRUD/data/database/DatabaseModal/index.tsx     | 44 +++++++++++++++-------
 1 file changed, 31 insertions(+), 13 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 2bbdb37..3249cfe 100644
--- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx
+++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx
@@ -555,20 +555,38 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
         closable={false}
         css={(theme: SupersetTheme) => antDAlertStyles(theme)}
         type="info"
-        message={t('Want to add a new database?')}
+        message={
+          connectionAlert?.ADD_DATABASE?.message ||
+          t('Want to add a new database?')
+        }
         description={
-          <>
-            Any databases that allow connetions via SQL Alchemy URIs can be
-            added. Learn about how to connect a database driver{' '}
-            <a
-              href={DOCUMENTATION_LINK}
-              target="_blank"
-              rel="noopener noreferrer"
-            >
-              here
-            </a>
-            .
-          </>
+          connectionAlert?.ADD_DATABASE ? (
+            <>
+              Any databases that allow connetions via SQL Alchemy URIs can be
+              added.{' '}
+              <a
+                href={connectionAlert?.ADD_DATABASE.contact_link}
+                target="_blank"
+                rel="noopener noreferrer"
+              >
+                {connectionAlert?.ADD_DATABASE.contact_description_link}
+              </a>{' '}
+              {connectionAlert?.ADD_DATABASE.description}
+            </>
+          ) : (
+            <>
+              Any databases that allow connetions via SQL Alchemy URIs can be
+              added. Learn about how to connect a database driver{' '}
+              <a
+                href={DOCUMENTATION_LINK}
+                target="_blank"
+                rel="noopener noreferrer"
+              >
+                here
+              </a>
+              .
+            </>
+          )
         }
       />
     </div>