diff --git a/superset-frontend/src/components/ImportModal/ErrorAlert.tsx b/superset-frontend/src/components/ImportModal/ErrorAlert.tsx index 91ee6467f4f9a..52bd54a796188 100644 --- a/superset-frontend/src/components/ImportModal/ErrorAlert.tsx +++ b/superset-frontend/src/components/ImportModal/ErrorAlert.tsx @@ -31,9 +31,13 @@ export const DOCUMENTATION_LINK = supersetTextDocs export interface IProps { errorMessage: string; + showDbInstallInstructions: boolean; } -const ErrorAlert: FunctionComponent = ({ errorMessage }) => ( +const ErrorAlert: FunctionComponent = ({ + errorMessage, + showDbInstallInstructions, +}) => ( antdWarningAlertStyles(theme)} @@ -41,21 +45,25 @@ const ErrorAlert: FunctionComponent = ({ errorMessage }) => ( showIcon message={errorMessage} description={ - <> -
- {t( - 'Database driver for importing maybe not installed. Visit the Superset documentation page for installation instructions:', - )} - - {t('here')} - - . - + showDbInstallInstructions ? ( + <> +
+ {t( + 'Database driver for importing maybe not installed. Visit the Superset documentation page for installation instructions:', + )} + + {t('here')} + + . + + ) : ( + '' + ) } /> ); diff --git a/superset-frontend/src/components/ImportModal/index.tsx b/superset-frontend/src/components/ImportModal/index.tsx index c13546f7d3bff..6a980f7d2013b 100644 --- a/superset-frontend/src/components/ImportModal/index.tsx +++ b/superset-frontend/src/components/ImportModal/index.tsx @@ -300,7 +300,12 @@ const ImportModelsModal: FunctionComponent = ({ - {errorMessage && } + {errorMessage && ( + 0} + /> + )} {renderPasswordFields()} {renderOverwriteConfirmation()}