Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Remove legacy sql alchemy db connection link from G Sheet connection #19450

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ const errorAlertMapping = {
),
},
};
const googleSheetConnectionEngine = 'gsheets';

interface DatabaseModalProps {
addDangerToast: (msg: string) => void;
addSuccessToast: (msg: string) => void;
Expand Down Expand Up @@ -1575,32 +1577,36 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
validationErrors={validationErrors}
/>
<div css={(theme: SupersetTheme) => infoTooltip(theme)}>
<Button
data-test="sqla-connect-btn"
buttonStyle="link"
onClick={() =>
setDB({
type: ActionType.configMethodChange,
payload: {
engine: db.engine,
configuration_method:
CONFIGURATION_METHOD.SQLALCHEMY_URI,
database_name: db.database_name,
},
})
}
css={buttonLinkStyles}
>
{t(
'Connect this database with a SQLAlchemy URI string instead',
)}
</Button>
<InfoTooltip
tooltip={t(
'Click this link to switch to an alternate form that allows you to input the SQLAlchemy URL for this database manually.',
)}
viewBox="0 -6 24 24"
/>
{dbModel.engine !== googleSheetConnectionEngine && (
<>
<Button
data-test="sqla-connect-btn"
buttonStyle="link"
onClick={() =>
setDB({
type: ActionType.configMethodChange,
payload: {
engine: db.engine,
configuration_method:
CONFIGURATION_METHOD.SQLALCHEMY_URI,
database_name: db.database_name,
},
})
}
css={buttonLinkStyles}
>
{t(
'Connect this database with a SQLAlchemy URI string instead',
)}
</Button>
<InfoTooltip
tooltip={t(
'Click this link to switch to an alternate form that allows you to input the SQLAlchemy URL for this database manually.',
)}
viewBox="0 -6 24 24"
/>
</>
)}
</div>
{/* Step 2 */}
{showDBError && errorAlert()}
Expand Down