From 28806a79e2138ca1307947ed75dd84d9a002e236 Mon Sep 17 00:00:00 2001 From: Philippe Perrin Date: Thu, 26 Aug 2021 11:12:16 +0200 Subject: [PATCH] SONAR-15327 Inform admin users that DevOps Platform secrets can be encrypted --- .../AlmBindingDefinitionFormField.tsx | 38 +++++++-- .../components/almIntegration/AzureForm.tsx | 1 + .../almIntegration/BitbucketCloudForm.tsx | 3 +- .../almIntegration/BitbucketServerForm.tsx | 1 + .../components/almIntegration/GithubForm.tsx | 4 +- .../components/almIntegration/GitlabForm.tsx | 1 + .../AlmBindingDefinitionFormField-test.tsx | 1 + ...lmBindingDefinitionFormField-test.tsx.snap | 79 ++++++++++++++++--- .../__snapshots__/AzureForm-test.tsx.snap | 2 + .../BitbucketCloudForm-test.tsx.snap | 3 +- .../BitbucketServerForm-test.tsx.snap | 1 + .../__snapshots__/GithubForm-test.tsx.snap | 8 +- .../__snapshots__/GitlabForm-test.tsx.snap | 2 + .../resources/org/sonar/l10n/core.properties | 7 +- 14 files changed, 126 insertions(+), 25 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormField.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormField.tsx index f07477bc8df..07142dc6f7b 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormField.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormField.tsx @@ -18,7 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { FormattedMessage } from 'react-intl'; +import { Link } from 'react-router'; import { ButtonLink } from '../../../../components/controls/buttons'; +import { Alert } from '../../../../components/ui/Alert'; import MandatoryFieldMarker from '../../../../components/ui/MandatoryFieldMarker'; import { translate } from '../../../../helpers/l10n'; import { AlmBindingDefinitionBase } from '../../../../types/alm-settings'; @@ -35,6 +38,7 @@ export interface AlmBindingDefinitionFormFieldProps( @@ -49,7 +53,8 @@ export function AlmBindingDefinitionFormField} {help &&
{help}
} -
+
{!showField && overwriteOnly && (
-

{translate('settings.almintegration.form.secret_field')}

+

{translate('settings.almintegration.form.secret.field')}

{ props.onFieldChange(propKey, ''); setShowField(true); }}> - {translate('settings.almintegration.form.update_secret_field')} + {translate('settings.almintegration.form.secret.update_field')}
)} {showField && isTextArea && (