From c30d3ac03b5ce425cc8e761d8a71a859c41282ca Mon Sep 17 00:00:00 2001 From: Gabriel Hernandez Date: Thu, 20 Mar 2025 22:03:10 +0000 Subject: [PATCH] small changes to placeholder and hint text in CA forms (#27372) For #26606 small changes to digicert and custom scep forms placeholders and help text --- .../components/AddCertAuthorityModal/helpers.tsx | 5 ++++- .../components/CustomSCEPForm/CustomSCEPForm.tsx | 6 +++--- .../components/DigicertForm/DigicertForm.tsx | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/AddCertAuthorityModal/helpers.tsx b/frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/AddCertAuthorityModal/helpers.tsx index 988c0c884e..d4d9c2509a 100644 --- a/frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/AddCertAuthorityModal/helpers.tsx +++ b/frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/AddCertAuthorityModal/helpers.tsx @@ -69,7 +69,10 @@ export const getDisplayErrMessage = (err: unknown) => { message = INVALID_API_TOKEN_ERROR; } else if (reason.includes("invalid profile GUID")) { message = INVALID_PROFILE_GUID_ERROR; - } else if (reason.includes("invalid URL")) { + } else if ( + reason.includes("invalid URL") || + reason.includes("no such host") + ) { message = INVALID_URL_ERROR; } else if (reason.includes("private key")) { message = PRIVATE_KEY_NOT_CONFIGURED_ERROR; diff --git a/frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/CustomSCEPForm/CustomSCEPForm.tsx b/frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/CustomSCEPForm/CustomSCEPForm.tsx index 4fb92db9ff..9bfeabd13e 100644 --- a/frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/CustomSCEPForm/CustomSCEPForm.tsx +++ b/frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/CustomSCEPForm/CustomSCEPForm.tsx @@ -47,7 +47,7 @@ const CustomSCEPForm = ({ config?.integrations.custom_scep_proxy ?? [], isEditing ), - [config?.integrations.custom_scep_proxy] + [config?.integrations.custom_scep_proxy, isEditing] ); const [ formValidation, @@ -83,8 +83,8 @@ const CustomSCEPForm = ({ error={formValidation.name?.message} onChange={onInputChange} parseTarget - placeholder="SCEP_WIFI" - helpText="Letters, numbers, and underscores only. Fleet will create configuration profile variables with the name as suffix (e.g. $FLEET_VAR_CUSTOM_SCEP_CHALLENGE_SCEP_WIFI)." + placeholder="WIFI_CERTIFICATE" + helpText="Letters, numbers, and underscores only. Fleet will create configuration profile variables with the name as suffix (e.g. $FLEET_VAR_CUSTOM_SCEP_CHALLENGE_WIFI_CERTIFICATE)." />