From 54dfc3f86a50a9e110813f914dc1afa84e3b952d Mon Sep 17 00:00:00 2001 From: Vitor Avila Date: Tue, 29 Aug 2023 22:57:12 -0300 Subject: [PATCH 1/2] fix(DB Connection): Update placeholder values for Snowflake connection --- .../DatabaseConnectionForm/ValidatedInputField.tsx | 4 ++-- .../src/features/databases/DatabaseModal/index.tsx | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/ValidatedInputField.tsx b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/ValidatedInputField.tsx index a00b3ba9354e9..5442980a3bd30 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/ValidatedInputField.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/ValidatedInputField.tsx @@ -24,9 +24,9 @@ import { FieldPropTypes } from '.'; const FIELD_TEXT_MAP = { account: { helpText: t( - 'Copy the account name of that database you are trying to connect to.', + 'Copy the account identifier of the database you are trying to connect to.', ), - placeholder: t('e.g. world_population'), + placeholder: t('e.g. xy12345.us-east-2.aws'), }, warehouse: { placeholder: t('e.g. compute_wh'), diff --git a/superset-frontend/src/features/databases/DatabaseModal/index.tsx b/superset-frontend/src/features/databases/DatabaseModal/index.tsx index 68dcfd4fed18c..555b21be79c8f 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/index.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/index.tsx @@ -667,12 +667,7 @@ const DatabaseModal: FunctionComponent = ({ const getPlaceholder = (field: string) => { if (field === 'database') { - switch (db?.engine) { - case Engines.Snowflake: - return t('e.g. xy12345.us-east-2.aws'); - default: - return t('e.g. world_population'); - } + return t('e.g. world_population'); } return undefined; }; From c6f4e79568ec95f32f047624b7909d73d2a98d0d Mon Sep 17 00:00:00 2001 From: Vitor Avila Date: Tue, 29 Aug 2023 23:50:32 -0300 Subject: [PATCH 2/2] update helptext --- .../DatabaseConnectionForm/ValidatedInputField.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/ValidatedInputField.tsx b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/ValidatedInputField.tsx index 5442980a3bd30..ec2e239ac4356 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/ValidatedInputField.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/ValidatedInputField.tsx @@ -24,7 +24,7 @@ import { FieldPropTypes } from '.'; const FIELD_TEXT_MAP = { account: { helpText: t( - 'Copy the account identifier of the database you are trying to connect to.', + 'Copy the identifier of the account you are trying to connect to.', ), placeholder: t('e.g. xy12345.us-east-2.aws'), },