diff --git a/superset-frontend/src/components/InfoTooltip/index.tsx b/superset-frontend/src/components/InfoTooltip/index.tsx index b355859397..369d2e931b 100644 --- a/superset-frontend/src/components/InfoTooltip/index.tsx +++ b/superset-frontend/src/components/InfoTooltip/index.tsx @@ -20,7 +20,7 @@ import React from 'react'; import { styled } from '@superset-ui/core'; import { Tooltip } from 'src/components/Tooltip'; -import Icon from 'src/components/Icon'; +import Icons from 'src/components/Icons'; export interface InfoTooltipProps { className?: string; @@ -74,7 +74,7 @@ export default function InfoTooltip({ overlayStyle={overlayStyle} color={bgColor} > - + ); } diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/ExtraOptions.tsx b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/ExtraOptions.tsx index c046c25011..200e720984 100644 --- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/ExtraOptions.tsx +++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/ExtraOptions.tsx @@ -18,7 +18,7 @@ */ import React, { ChangeEvent, EventHandler } from 'react'; import cx from 'classnames'; -import { t, SupersetTheme } from '@superset-ui/core'; +import { t, SupersetTheme, styled } from '@superset-ui/core'; import InfoTooltip from 'src/components/InfoTooltip'; import IndeterminateCheckbox from 'src/components/IndeterminateCheckbox'; import Collapse from 'src/components/Collapse'; @@ -34,6 +34,15 @@ const defaultExtra = '{\n "metadata_params": {},\n "engine_params": {},' + '\n "metadata_cache_timeout": {},\n "schemas_allowed_for_csv_upload": [] \n}'; +const StyledOptionContainer = styled.div` + .input-container > div > svg { + margin-top: ${({ theme }) => theme.gridUnit * 0.25}px; + } + span[role='img'] { + margin-top: ${({ theme }) => theme.gridUnit * 0.5}px; + } +`; + const ExtraOptions = ({ db, onInputChange, @@ -49,338 +58,343 @@ const ExtraOptions = ({ const createAsOpen = !!(db?.allow_ctas || db?.allow_cvas); return ( - antdCollapseStyles(theme)} - > - -

SQL Lab

-

- Configure how this database will function in SQL Lab. -

- - } - key="1" + + antdCollapseStyles(theme)} > - -
- - -
- - -
- - -
-
- -
- - -
- -
{t('CTAS & CVAS SCHEMA')}
+ +

SQL Lab

+

+ Configure how this database will function in SQL Lab. +

+ + } + key="1" + > + +
+ + +
+ +
- +
-
- {t( - 'When allowing CREATE TABLE AS option in SQL Lab, this option ' + - 'forces the table to be created in this schema.', - )} + + +
+ + +
+ +
{t('CTAS & CVAS SCHEMA')}
+
+ +
+
+ {t( + 'When allowing CREATE TABLE AS option in SQL Lab, this option ' + + 'forces the table to be created in this schema.', + )} +
+
+
+ +
+ +
- - -
- - + +
+ + +
+
+ + + + +

Performance

+

+ Adjust settings that will impact the performance of this + database. +

+
+ } + key="2" + > + +
{t('Chart cache timeout')}
+
+ +
+
+ {t( + 'Duration (in seconds) of the caching timeout for charts of this database.' + + ' A timeout of 0 indicates that the cache never expires.' + + ' Note this defaults to the global timeout if undefined.', + )} +
+
+ +
+ + +
+
+ + +

Security

+

+ Add connection information for other systems. +

+
+ } + key="3" + > + +
{t('Secure extra')}
+
+ + onEditorChange({ json, name: 'encrypted_extra' }) + } + width="100%" + height="160px" + /> +
+
+
+ {t( + 'JSON string containing additional connection configuration.', + )}
- - -
- - +
+ {t( + 'This is used to provide connection information for systems like Hive, ' + + 'Presto, and BigQuery, which do not conform to the username:password syntax ' + + 'normally used by SQLAlchemy.', + )}
- - - - - -

Performance

-

- Adjust settings that will impact the performance of this database. -

-
- } - key="2" - > - -
{t('Chart cache timeout')}
-
- -
-
- {t( - 'Duration (in seconds) of the caching timeout for charts of this database.' + - ' A timeout of 0 indicates that the cache never expires.' + - ' Note this defaults to the global timeout if undefined.', - )} -
-
- -
- - -
-
- - -

Security

-

- Add connection information for other systems. -

-
- } - key="3" - > - -
{t('Secure extra')}
-
- - onEditorChange({ json, name: 'encrypted_extra' }) - } - width="100%" - height="160px" - /> -
-
-
- {t('JSON string containing additional connection configuration.')}
-
+ + +
{t('Root certificate')}
+
+