-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
chore: Add tooltips and button to Connect Postgresql DB Modal Form #15179
Changes from 4 commits
bf0131e
69682a9
8f9475b
dbf8770
e590bfc
fa6c2c5
23178d4
aea5905
9a2216d
2622bfe
b73b40b
a4654a3
8d364cc
c1325ab
46ebb23
c8bbce0
49bafb3
6da403e
34d56a1
c103c02
23b5a1d
2cdf91a
4a39740
b0de82a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/** | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
placement* distributed with this work for additional information | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the star should be to the left |
||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
|
@@ -34,6 +34,7 @@ import { Alert, Select } from 'src/common/components'; | |
import Modal from 'src/components/Modal'; | ||
import Button from 'src/components/Button'; | ||
import IconButton from 'src/components/IconButton'; | ||
import InfoTooltip from 'src/components/InfoTooltip'; | ||
import withToasts from 'src/messageToasts/enhancers/withToasts'; | ||
import { | ||
testDatabaseConnection, | ||
|
@@ -63,6 +64,7 @@ import { | |
formStyles, | ||
StyledBasicTab, | ||
SelectDatabaseStyles, | ||
infoTooltip, | ||
} from './styles'; | ||
import ModalHeader, { DOCUMENTATION_LINK } from './ModalHeader'; | ||
|
||
|
@@ -817,22 +819,28 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({ | |
getValidation={() => getValidation(db)} | ||
validationErrors={validationErrors} | ||
/> | ||
|
||
<Button | ||
buttonStyle="link" | ||
onClick={() => | ||
setDB({ | ||
type: ActionType.configMethodChange, | ||
payload: { | ||
configuration_method: | ||
CONFIGURATION_METHOD.SQLALCHEMY_URI, | ||
}, | ||
}) | ||
} | ||
css={buttonLinkStyles} | ||
> | ||
Connect this database with a SQLAlchemy URI string instead | ||
</Button> | ||
<div css={(theme: SupersetTheme) => infoTooltip(theme)}> | ||
<Button | ||
buttonStyle="link" | ||
onClick={() => | ||
setDB({ | ||
type: ActionType.configMethodChange, | ||
payload: { | ||
configuration_method: | ||
CONFIGURATION_METHOD.SQLALCHEMY_URI, | ||
}, | ||
}) | ||
} | ||
css={buttonLinkStyles} | ||
> | ||
Connect this database with a SQLAlchemy URI string instead | ||
<InfoTooltip | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, you're surrounding the button + tooltip in a div, which makes me think you don't want the tooltip to be able to link to sql alchemy. But the info tooltip is still inside the button component. |
||
tooltip={t( | ||
'Click this link to switch to an alternate form that allows you to input the SQLAlchemy URL for this database manually.', | ||
)} | ||
/> | ||
</Button> | ||
</div> | ||
{/* Step 2 */} | ||
</> | ||
))} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove these comments