Skip to content

Conversation

@gabester78
Copy link
Contributor

SUMMARY

Changed the SSL tooltip text to updated based on the database the user selects.
https://trello.com/c/B4i4wtpq/29-update-ssl-tooltip-text

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen Shot 2021-09-22 at 12 49 32 PM

TESTING INSTRUCTIONS

  • From Welcome screen navigate to Data > Databases
  • Click on "+ Database" button
  • Click on PostgreSQL or MySql icons or select Amazon Redshift from the supported databases dropdown menu
  • Hover over SLL Tooltip at the bottom of the form

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@gabester78 gabester78 changed the title Copied over changes from original branch 'gabe/SSL_Tooltip_update' style: update text for SLL Tooltip Revised Sep 29, 2021
include_trailing_comma = true
line_length = 88
known_first_party = superset
known_third_party =alembic,apispec,backoff,bleach,cachelib,celery,click,colorama,cron_descriptor,croniter,cryptography,dateutil,deprecation,flask,flask_appbuilder,flask_babel,flask_caching,flask_compress,flask_jwt_extended,flask_login,flask_migrate,flask_sqlalchemy,flask_talisman,flask_testing,flask_wtf,freezegun,geohash,geopy,graphlib,holidays,humanize,isodate,jinja2,jwt,markdown,markupsafe,marshmallow,marshmallow_enum,msgpack,numpy,pandas,parameterized,parsedatetime,pgsanity,pkg_resources,polyline,prison,progress,pyarrow,pyhive,pyparsing,pytest,pytest_mock,pytz,redis,requests,selenium,setuptools,simplejson,slack,sqlalchemy,sqlalchemy_utils,sqlparse,typing_extensions,urllib3,werkzeug,wtforms,wtforms_json,yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you want to add graphlib here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I was trying to. I couldn't find the right way to install it.

/>
<span css={toggleStyle}>SSL</span>
<InfoTooltip
tooltip={t(tooltipText[db?.database_name!])}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! using the ! is not an encouraged action. Was this to solve a TypeScript error? Also, what happens if a database name isn't in toolTip text? Might be worth to have a || here or a default option. Let me know if you want help with either of those options.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it was to solve an error. The code was working on localhost, but the error below wouldn't go away. The data isn't passed through to the tooltip until the user clicks on the card. Typescript assumed there was no data.
Screen Shot 2021-10-01 at 3 28 58 PM

Copy link
Member

@geido geido left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution! I added some suggestions to include localized strings

}: FieldPropTypes) => {
const tooltipText = {
PostgreSQL:
'Requires a root certificate authority (public, local, or self-signed). SSL Mode "require" will be used.',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'Requires a root certificate authority (public, local, or self-signed). SSL Mode "require" will be used.',
t('Requires a root certificate authority (public, local, or self-signed). SSL Mode "require" will be used.'),

PostgreSQL:
'Requires a root certificate authority (public, local, or self-signed). SSL Mode "require" will be used.',
MySQL:
'Requires a root certificate authority (public, local, or self-signed).',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'Requires a root certificate authority (public, local, or self-signed).',
t('Requires a root certificate authority (public, local, or self-signed).'),

MySQL:
'Requires a root certificate authority (public, local, or self-signed).',
'Amazon Redshift':
'Requires a root certificate authority (public, local, or self-signed). SSL Mode "verify-ca" will be used.',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'Requires a root certificate authority (public, local, or self-signed). SSL Mode "verify-ca" will be used.',
t('Requires a root certificate authority (public, local, or self-signed). SSL Mode "verify-ca" will be used.'),

@gabester78
Copy link
Contributor Author

Closing PR. The feature is being changed back to the same string for all databases the user may choose. Trello Task

@gabester78 gabester78 closed this Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants