diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/ModalHeader.tsx b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/ModalHeader.tsx index 2ec124c341be5..73c9dc4514247 100644 --- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/ModalHeader.tsx +++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/ModalHeader.tsx @@ -108,19 +108,10 @@ const ModalHeader = ({ STEP 3 OF 3 - - Your database was successfully connected! Create a dataset to begin - visualizing your data as a chart or go to SQL Lab to query your data. - - - Need help? Learn more about{' '} - - connecting to {dbModel.name}. - + Database connected + + Create a dataset to begin visualizing your data as a chart or go to + SQL Lab to query your data. 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 9fe44544d2491..eff95313dae20 100644 --- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx +++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx @@ -445,6 +445,7 @@ const DatabaseModal: FunctionComponent = ({ const [validationErrors, getValidation, setValidationErrors] = useDatabaseValidation(); const [hasConnectedDb, setHasConnectedDb] = useState(false); + const [showCTAbtns, setShowCTAbtns] = useState(false); const [dbName, setDbName] = useState(''); const [editNewDb, setEditNewDb] = useState(false); const [isLoading, setLoading] = useState(false); @@ -666,6 +667,7 @@ const DatabaseModal: FunctionComponent = ({ } } + setShowCTAbtns(true); setEditNewDb(false); setLoading(false); }; @@ -808,6 +810,7 @@ const DatabaseModal: FunctionComponent = ({ if (dbFetched) { fetchResource(dbFetched.id as number); } + setShowCTAbtns(false); setEditNewDb(true); }; @@ -1156,24 +1159,25 @@ const DatabaseModal: FunctionComponent = ({ { + setLoading(true); fetchAndSetDB(); - window.location.href = '/tablemodelview/list'; + window.location.href = '/tablemodelview/list#create'; }} > - {' '} - {t('CREATE A DATASET')}{' '} + {t('CREATE DATASET')} { + setLoading(true); fetchAndSetDB(); window.location.href = `/superset/sqllab/?db=true`; }} > - {t('QUERY DATA IN SQL LAB')}{' '} + {t('QUERY DATA IN SQL LAB')} ); @@ -1498,7 +1502,7 @@ const DatabaseModal: FunctionComponent = ({ title={{t('Connect a database')}} footer={renderModalFooter()} > - {hasConnectedDb ? ( + {!isLoading && hasConnectedDb ? ( <> = ({ dbModel={dbModel} editNewDb={editNewDb} /> - {renderCTABtns()} + {showCTAbtns && renderCTABtns()} {renderFinishState()} > ) : ( diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/styles.ts b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/styles.ts index b7c5aa57a9beb..015ba17bf6ec4 100644 --- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/styles.ts +++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/styles.ts @@ -51,6 +51,10 @@ export const StyledFormHeader = styled.header` margin: 0; } + .subheader-text { + line-height: ${({ theme }) => theme.gridUnit * 4.25}px; + } + .helper-bottom { padding-top: 0; color: ${({ theme }) => theme.colors.grayscale.base};
STEP 3 OF 3
- Need help? Learn more about{' '} - - connecting to {dbModel.name}. - +
+ Create a dataset to begin visualizing your data as a chart or go to + SQL Lab to query your data.