mirror of
https://github.com/apache/superset.git
synced 2024-09-06 13:57:40 -04:00
feat: Remove legacy sql alchemy db connection link from G Sheet connection (#19450)
* feat: Remove legacy sql alchemy db connection link from G Sheet connection * resolve comment
This commit is contained in:
parent
158852d074
commit
94075983f8
@ -139,6 +139,8 @@ const errorAlertMapping = {
|
||||
),
|
||||
},
|
||||
};
|
||||
const googleSheetConnectionEngine = 'gsheets';
|
||||
|
||||
interface DatabaseModalProps {
|
||||
addDangerToast: (msg: string) => void;
|
||||
addSuccessToast: (msg: string) => void;
|
||||
@ -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()}
|
||||
|
Loading…
Reference in New Issue
Block a user