betodealmeida commented on a change in pull request #19314: URL: https://github.com/apache/superset/pull/19314#discussion_r838840045
########## File path: superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx ########## @@ -861,19 +925,98 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({ } }, [availableDbs]); - const tabChange = (key: string) => { - setTabKey(key); + const onDbImport = (info: UploadChangeParam) => { + setImportingModal(true); + setFile([ + { + ...info.file, + status: 'done', + }, + ]); + + if (!(info.file.originFileObj instanceof File)) return; + importResource(info.file.originFileObj, passwords, confirmedOverwrite); + }; + + const passwordNeededField = () => { + if (passwordsNeeded.length === 0) return null; + + return passwordsNeeded.map(database => ( + <> + <StyledAlertMargin> + <Alert + closable={false} + css={(theme: SupersetTheme) => antDAlertStyles(theme)} + type="info" + showIcon + message="Database passwords" + description={t( + `The passwords for the databases below are needed in order to import them. Please not that the "Secure Extra" and "Certificate" sections of the database configuration are not present in explore files and should be added manually after the import if they are needed.`, Review comment: ```suggestion `The passwords for the databases below are needed in order to import them. Please note that the "Secure Extra" and "Certificate" sections of the database configuration are also not present in exported files and should be added manually after the import if they are needed.`, ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org