From 0ee05127e0763c62a97ba4f3761620e7ff980aec Mon Sep 17 00:00:00 2001 From: Jeremy Pople Date: Tue, 8 Oct 2024 17:06:14 -0700 Subject: [PATCH 1/6] add question tooltip --- .../forms/ConnectorParametersForm.tsx | 40 +++++++++++++------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/clients/admin-ui/src/features/datastore-connections/system_portal_config/forms/ConnectorParametersForm.tsx b/clients/admin-ui/src/features/datastore-connections/system_portal_config/forms/ConnectorParametersForm.tsx index 08afd893d4..995b559c2e 100644 --- a/clients/admin-ui/src/features/datastore-connections/system_portal_config/forms/ConnectorParametersForm.tsx +++ b/clients/admin-ui/src/features/datastore-connections/system_portal_config/forms/ConnectorParametersForm.tsx @@ -485,18 +485,34 @@ export const ConnectorParametersForm = ({ )} {SystemType.DATABASE === connectionOption.type && !isCreatingConnectionConfig && ( - +
+ + + + + + +
)}
{!connectionOption.authorization_required || authorized ? ( From caf6d5c44357adae69502b7ee65e1f39fb4757d0 Mon Sep 17 00:00:00 2001 From: Jeremy Pople Date: Wed, 9 Oct 2024 13:55:31 -0700 Subject: [PATCH 2/6] WIP: new DatasetSelect component --- .../forms/ConnectorParametersForm.tsx | 32 +-------- .../forms/SelectDataset.tsx | 70 +++++++++++++++++++ 2 files changed, 73 insertions(+), 29 deletions(-) create mode 100644 clients/admin-ui/src/features/datastore-connections/system_portal_config/forms/SelectDataset.tsx diff --git a/clients/admin-ui/src/features/datastore-connections/system_portal_config/forms/ConnectorParametersForm.tsx b/clients/admin-ui/src/features/datastore-connections/system_portal_config/forms/ConnectorParametersForm.tsx index 8a23681432..328c8240b6 100644 --- a/clients/admin-ui/src/features/datastore-connections/system_portal_config/forms/ConnectorParametersForm.tsx +++ b/clients/admin-ui/src/features/datastore-connections/system_portal_config/forms/ConnectorParametersForm.tsx @@ -1,4 +1,4 @@ -import { CustomSelect, Option, SelectInput } from "common/form/inputs"; +import { Option, SelectInput } from "common/form/inputs"; import { ConnectionTypeSecretSchemaProperty, ConnectionTypeSecretSchemaResponse, @@ -30,6 +30,7 @@ import { DatastoreConnectionStatus } from "src/features/datastore-connections/ty import { useFeatures } from "~/features/common/features"; import DisableConnectionModal from "~/features/datastore-connections/DisableConnectionModal"; +import SelectDataset from "~/features/datastore-connections/system_portal_config/forms/SelectDataset"; import { ConnectionConfigurationResponse, ConnectionSystemTypeMap, @@ -485,34 +486,7 @@ export const ConnectorParametersForm = ({ )} {SystemType.DATABASE === connectionOption.type && !isCreatingConnectionConfig && ( -
- - - - - - -
+ )}
{!connectionOption.authorization_required || authorized ? ( diff --git a/clients/admin-ui/src/features/datastore-connections/system_portal_config/forms/SelectDataset.tsx b/clients/admin-ui/src/features/datastore-connections/system_portal_config/forms/SelectDataset.tsx new file mode 100644 index 0000000000..38a3c8b1d5 --- /dev/null +++ b/clients/admin-ui/src/features/datastore-connections/system_portal_config/forms/SelectDataset.tsx @@ -0,0 +1,70 @@ +import { + CircleHelpIcon, + Flex, + FormControl, + FormErrorMessage, + FormLabel, + Tooltip, + VStack, +} from "fidesui"; +import { useField } from "formik"; + +import { + CustomSelect, + Option, + SelectInput, +} from "~/features/common/form/inputs"; + +const SelectDataset = ({ options }: { options?: Option[] }) => { + const [, { error }] = useField("dataset"); + return ( + + + Datasets + + + + {/* {error} */} + + + //
+ // + // + // + // + // + // + //
+ ); +}; + +export default SelectDataset; From f51384d638f2353a237f961525c5b4e175126ef6 Mon Sep 17 00:00:00 2001 From: Jeremy Pople Date: Wed, 23 Oct 2024 01:19:24 -0500 Subject: [PATCH 3/6] finish styling --- .../forms/SelectDataset.tsx | 63 +++++++------------ 1 file changed, 24 insertions(+), 39 deletions(-) diff --git a/clients/admin-ui/src/features/datastore-connections/system_portal_config/forms/SelectDataset.tsx b/clients/admin-ui/src/features/datastore-connections/system_portal_config/forms/SelectDataset.tsx index 38a3c8b1d5..60edbeedba 100644 --- a/clients/admin-ui/src/features/datastore-connections/system_portal_config/forms/SelectDataset.tsx +++ b/clients/admin-ui/src/features/datastore-connections/system_portal_config/forms/SelectDataset.tsx @@ -1,4 +1,5 @@ import { + Box, CircleHelpIcon, Flex, FormControl, @@ -9,11 +10,7 @@ import { } from "fidesui"; import { useField } from "formik"; -import { - CustomSelect, - Option, - SelectInput, -} from "~/features/common/form/inputs"; +import { Option, SelectInput } from "~/features/common/form/inputs"; const SelectDataset = ({ options }: { options?: Option[] }) => { const [, { error }] = useField("dataset"); @@ -28,42 +25,30 @@ const SelectDataset = ({ options }: { options?: Option[] }) => { > Datasets - - - {/* {error} */} + + + + + {error} + + + + + - //
- // - // - // - // - // - // - //
); }; From 66c21b37afe20edee646c016851a678e2a3948b4 Mon Sep 17 00:00:00 2001 From: Jeremy Pople Date: Wed, 23 Oct 2024 09:39:39 -0500 Subject: [PATCH 4/6] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29dfc834fe..9860e8133c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ The types of changes are: - Fixed a bug where D&D tables were rendering stale data [#5372](https://github.com/ethyca/fides/pull/5372) - Fixed issue where multiple login redirects could end up losing login return path [#5389](https://github.com/ethyca/fides/pull/5389) - Fixed issue where Dataset with nested fields was unable to edit Categories [#5383](https://github.com/ethyca/fides/pull/5383) +- Fixed styling on "Dataset" field on system integration form [#5408](https://github.com/ethyca/fides/pull/5408) ### Developer Experience - Fix warning messages from slowapi and docker [#5385](https://github.com/ethyca/fides/pull/5385) From d169b43dea97172fd07abbea69597b772d5b0bcf Mon Sep 17 00:00:00 2001 From: Jeremy Pople Date: Wed, 23 Oct 2024 11:24:51 -0500 Subject: [PATCH 5/6] update 'BigQuery dataset' field label --- .../connection_configuration/connection_secrets_bigquery.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fides/api/schemas/connection_configuration/connection_secrets_bigquery.py b/src/fides/api/schemas/connection_configuration/connection_secrets_bigquery.py index 8eeeed63c6..7a64e94668 100644 --- a/src/fides/api/schemas/connection_configuration/connection_secrets_bigquery.py +++ b/src/fides/api/schemas/connection_configuration/connection_secrets_bigquery.py @@ -36,13 +36,13 @@ class BigQuerySchema(ConnectionConfigSecretsSchema): """Schema to validate the secrets needed to connect to BigQuery""" keyfile_creds: KeyfileCreds = Field( - title="Keyfile Creds", + title="Keyfile creds", json_schema_extra={"sensitive": True}, description="The contents of the key file that contains authentication credentials for a service account in GCP.", ) dataset: Optional[str] = Field( default=None, - title="Default BigQuery Dataset", + title="Default dataset", description="The default BigQuery dataset that will be used if one isn't provided in the associated Fides datasets.", ) From 8d46c8969188a3e5f2fe5e59808e54509e5d305a Mon Sep 17 00:00:00 2001 From: Jeremy Pople Date: Wed, 23 Oct 2024 12:27:09 -0500 Subject: [PATCH 6/6] update BQ schema test with new info --- .../api/v1/endpoints/test_connection_template_endpoints.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ops/api/v1/endpoints/test_connection_template_endpoints.py b/tests/ops/api/v1/endpoints/test_connection_template_endpoints.py index 942d76257c..700c2acf4c 100644 --- a/tests/ops/api/v1/endpoints/test_connection_template_endpoints.py +++ b/tests/ops/api/v1/endpoints/test_connection_template_endpoints.py @@ -839,13 +839,13 @@ def test_get_connection_secret_schema_bigquery( "type": "object", "properties": { "keyfile_creds": { - "title": "Keyfile Creds", + "title": "Keyfile creds", "description": "The contents of the key file that contains authentication credentials for a service account in GCP.", "sensitive": True, "allOf": [{"$ref": "#/definitions/KeyfileCreds"}], }, "dataset": { - "title": "Default BigQuery Dataset", + "title": "Default dataset", "description": "The default BigQuery dataset that will be used if one isn't provided in the associated Fides datasets.", "type": "string", },