diff --git a/frontend/src/components/v2/Input/Input.tsx b/frontend/src/components/v2/Input/Input.tsx index f8814f464..019c80614 100644 --- a/frontend/src/components/v2/Input/Input.tsx +++ b/frontend/src/components/v2/Input/Input.tsx @@ -126,7 +126,7 @@ export const Input = forwardRef( )} /> {warningMessage && !rightIcon && ( - + )} diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/CreateSecretForm/CreateSecretForm.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/CreateSecretForm/CreateSecretForm.tsx index af6876de9..2dc1ddcb0 100644 --- a/frontend/src/pages/secret-manager/OverviewPage/components/CreateSecretForm/CreateSecretForm.tsx +++ b/frontend/src/pages/secret-manager/OverviewPage/components/CreateSecretForm/CreateSecretForm.tsx @@ -222,9 +222,11 @@ export const CreateSecretForm = ({ secretPath = "/", onClose }: Props) => {
Secret key contains whitespaces.
-
If this is the desired format, you need to encode it with{" "} - %20 when making API - requests. +
If this is the desired format, you need to provide it as{" "} + + {secretKey.trim().replaceAll(" ", "%20")} + {" "} + when making API requests.
) : undefined } diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/CreateSecretForm/CreateSecretForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/CreateSecretForm/CreateSecretForm.tsx index 3378dee01..82cc6b5e0 100644 --- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/CreateSecretForm/CreateSecretForm.tsx +++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/CreateSecretForm/CreateSecretForm.tsx @@ -183,9 +183,11 @@ export const CreateSecretForm = ({
Secret key contains whitespaces.
-
If this is the desired format, you need to encode it with{" "} - %20 when making API - requests. +
If this is the desired format, you need to provide it as{" "} + + {secretKey.trim().replaceAll(" ", "%20")} + {" "} + when making API requests.
) : undefined } diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretListView/SecretItem.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretListView/SecretItem.tsx index 594899474..20c4c34b4 100644 --- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretListView/SecretItem.tsx +++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretListView/SecretItem.tsx @@ -488,13 +488,15 @@ export const SecretItem = memo( isError={Boolean(error)} onKeyUp={() => trigger("key")} warningMessage={ - field.value.includes(" ") ? ( + field.value?.includes(" ") ? (
Secret key contains whitespaces.
-
If this is the desired format, you need to encode it with{" "} - %20 when - making API requests. +
If this is the desired format, you need to provide it as{" "} + + {field.value.trim().replaceAll(" ", "%20")} + {" "} + when making API requests.
) : undefined }