{description}
+ {!isExpandable && ( + setIsModalOpen(true)} + > + {t('See more')} + + )} +{subtitle}
diff --git a/superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.tsx b/superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.tsx index 44bd560f39bd2..b54277b4ac2db 100644 --- a/superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.tsx +++ b/superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.tsx @@ -32,6 +32,7 @@ type Props = { copyText?: string; stackTrace?: string; source?: ErrorSource; + description?: string; errorMitigationFunction?: () => void; }; @@ -43,6 +44,7 @@ export default function ErrorMessageWithStackTrace({ link, stackTrace, source, + description, }: Props) { // Check if a custom error message component was registered for this message if (error) { @@ -66,6 +68,7 @@ export default function ErrorMessageWithStackTrace({ title={title} subtitle={subtitle} copyText={copyText} + description={description} source={source} body={ link || stackTrace ? ( 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 a4451822aff86..a47289cff53e0 100644 --- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx +++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx @@ -42,6 +42,7 @@ import IconButton from 'src/components/IconButton'; import InfoTooltip from 'src/components/InfoTooltip'; import withToasts from 'src/components/MessageToasts/withToasts'; import ValidatedInput from 'src/components/Form/LabeledErrorBoundInput'; +import ErrorMessageWithStackTrace from 'src/components/ErrorMessage/ErrorMessageWithStackTrace'; import ErrorAlert from 'src/components/ImportModal/ErrorAlert'; import { testDatabaseConnection, @@ -65,7 +66,6 @@ import ExtraOptions from './ExtraOptions'; import SqlAlchemyForm from './SqlAlchemyForm'; import DatabaseConnectionForm from './DatabaseConnectionForm'; import { - antDErrorAlertStyles, antDAlertStyles, antdWarningAlertStyles, StyledAlertMargin, @@ -112,6 +112,12 @@ const TabsStyled = styled(Tabs)` } `; +const ErrorAlertContainer = styled.div` + ${({ theme }) => ` + margin: ${theme.gridUnit * 8}px ${theme.gridUnit * 4}px; + `}; +`; + interface DatabaseModalProps { addDangerToast: (msg: string) => void; addSuccessToast: (msg: string) => void; @@ -471,7 +477,7 @@ const DatabaseModal: FunctionComponent