diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm.tsx b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm.tsx index 3c6adc0200d4f..28fdb78b2ea37 100644 --- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm.tsx +++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm.tsx @@ -63,7 +63,7 @@ interface FieldPropTypes { db?: DatabaseObject; isEditMode?: boolean; sslForced?: boolean; - name?: string; + defaultDBName?: string; } const CredentialsInfo = ({ changeMethods }: FieldPropTypes) => { @@ -258,13 +258,13 @@ const displayField = ({ getValidation, validationErrors, db, - name, + defaultDBName, }: FieldPropTypes) => ( = ({ ] : []; + const renderEditModalFooter = () => ( + <> + + Close + + + Finish + + + ); useEffect(() => { if (show) { setTabKey(DEFAULT_TAB_KEY); @@ -593,7 +603,7 @@ const DatabaseModal: FunctionComponent = ({ title={

{isEditMode ? t('Edit database') : t('Connect a database')}

} - footer={renderModalFooter()} + footer={isEditMode ? renderEditModalFooter() : renderModalFooter()} > css` + margin-bottom: ${theme.gridUnit * 4}px; +`; + export const StyledFormHeader = styled.header` border-bottom: ${({ theme }) => `${theme.gridUnit * 0.25}px solid ${theme.colors.grayscale.light2};`} @@ -137,7 +141,8 @@ export const antDModalStyles = (theme: SupersetTheme) => css` export const antDAlertStyles = (theme: SupersetTheme) => css` border: 1px solid ${theme.colors.info.base}; padding: ${theme.gridUnit * 4}px; - margin: ${theme.gridUnit * 8}px ${theme.gridUnit * 3}px 0; + margin: ${theme.gridUnit * 8}px ${theme.gridUnit * 3}px + ${theme.gridUnit * 4}px; .ant-alert-message { color: ${theme.colors.info.dark2}; font-size: ${theme.typography.sizes.s + 1}px;