From: Belen Pruvost Date: Wed, 25 Aug 2021 16:17:09 +0000 (+0200) Subject: SONAR-15340 - Increase DevOps form fields max length X-Git-Tag: 9.1.0.47736~77 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=eb5fd708f79d83bbfc2683dea406c875c4d2541e;p=sonarqube.git SONAR-15340 - Increase DevOps form fields max length --- diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AzureForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AzureForm.tsx index 30835e23826..128f260f341 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AzureForm.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AzureForm.tsx @@ -93,6 +93,7 @@ export default function AzureForm(props: AzureFormProps) { overwriteOnly={Boolean(formData.key)} propKey="personalAccessToken" value={formData.personalAccessToken} + maxLength={2000} isSecret={true} /> diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/BitbucketCloudForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/BitbucketCloudForm.tsx index 928163cf8e0..f6d08382860 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/BitbucketCloudForm.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/BitbucketCloudForm.tsx @@ -104,6 +104,7 @@ export default function BitbucketCloudForm(props: BitbucketCloudFormProps) { overwriteOnly={Boolean(formData.key)} propKey="clientSecret" value={formData.clientSecret || ''} + maxLength={160} isSecret={true} /> diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/BitbucketServerForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/BitbucketServerForm.tsx index b9e8721fb2c..9779db9e329 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/BitbucketServerForm.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/BitbucketServerForm.tsx @@ -92,6 +92,7 @@ export default function BitbucketServerForm(props: BitbucketServerFormProps) { overwriteOnly={Boolean(formData.key)} propKey="personalAccessToken" value={formData.personalAccessToken || ''} + maxLength={2000} isSecret={true} /> diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/GithubForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/GithubForm.tsx index d2799439006..a94593e57aa 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/GithubForm.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/GithubForm.tsx @@ -95,7 +95,7 @@ export default function GithubForm(props: GithubFormProps) { diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/GitlabForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/GitlabForm.tsx index 6f938ef6f29..015fbc581aa 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/GitlabForm.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/GitlabForm.tsx @@ -89,6 +89,7 @@ export default function GitlabForm(props: GitlabFormProps) { overwriteOnly={Boolean(formData.key)} propKey="personalAccessToken" value={formData.personalAccessToken} + maxLength={2000} isSecret={true} /> diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AzureForm-test.tsx.snap b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AzureForm-test.tsx.snap index 6120baaa242..d03d8b8f90a 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AzureForm-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AzureForm-test.tsx.snap @@ -65,6 +65,7 @@ exports[`should render correctly: create 1`] = ` id="personal_access_token" isSecret={true} isTextArea={true} + maxLength={2000} onFieldChange={[MockFunction]} overwriteOnly={false} propKey="personalAccessToken" @@ -138,6 +139,7 @@ exports[`should render correctly: edit 1`] = ` id="personal_access_token" isSecret={true} isTextArea={true} + maxLength={2000} onFieldChange={[MockFunction]} overwriteOnly={true} propKey="personalAccessToken" diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/BitbucketCloudForm-test.tsx.snap b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/BitbucketCloudForm-test.tsx.snap index 02b2f021223..4fd3e07e4fa 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/BitbucketCloudForm-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/BitbucketCloudForm-test.tsx.snap @@ -77,6 +77,7 @@ exports[`should render correctly 1`] = ` help="settings.almintegration.form.oauth_secret.bitbucketcloud.help" id="client_secret.bitbucketcloud" isSecret={true} + maxLength={160} onFieldChange={[MockFunction]} overwriteOnly={true} propKey="clientSecret" diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/BitbucketServerForm-test.tsx.snap b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/BitbucketServerForm-test.tsx.snap index 086b09f83cd..168036c2123 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/BitbucketServerForm-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/BitbucketServerForm-test.tsx.snap @@ -61,6 +61,7 @@ exports[`should render correctly 1`] = ` id="personal_access_token" isSecret={true} isTextArea={true} + maxLength={2000} onFieldChange={[MockFunction]} overwriteOnly={true} propKey="personalAccessToken" diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/GithubForm-test.tsx.snap b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/GithubForm-test.tsx.snap index 4499dc5e2a1..2eaa2b19995 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/GithubForm-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/GithubForm-test.tsx.snap @@ -74,7 +74,7 @@ exports[`should render correctly 1`] = ` help="settings.almintegration.form.client_secret.github.help" id="client_secret.github" isSecret={true} - maxLength={80} + maxLength={160} onFieldChange={[MockFunction]} overwriteOnly={false} propKey="clientSecret" @@ -85,6 +85,7 @@ exports[`should render correctly 1`] = ` id="private_key" isSecret={true} isTextArea={true} + maxLength={2500} onFieldChange={[MockFunction]} overwriteOnly={false} propKey="privateKey" @@ -167,7 +168,7 @@ exports[`should render correctly 2`] = ` help="settings.almintegration.form.client_secret.github.help" id="client_secret.github" isSecret={true} - maxLength={80} + maxLength={160} onFieldChange={[MockFunction]} overwriteOnly={true} propKey="clientSecret" @@ -178,6 +179,7 @@ exports[`should render correctly 2`] = ` id="private_key" isSecret={true} isTextArea={true} + maxLength={2500} onFieldChange={[MockFunction]} overwriteOnly={true} propKey="privateKey" diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/GitlabForm-test.tsx.snap b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/GitlabForm-test.tsx.snap index f8b95437d64..33452300e00 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/GitlabForm-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/GitlabForm-test.tsx.snap @@ -61,6 +61,7 @@ exports[`should render correctly 1`] = ` id="personal_access_token" isSecret={true} isTextArea={true} + maxLength={2000} onFieldChange={[MockFunction]} overwriteOnly={false} propKey="personalAccessToken" @@ -130,6 +131,7 @@ exports[`should render correctly 2`] = ` id="personal_access_token" isSecret={true} isTextArea={true} + maxLength={2000} onFieldChange={[MockFunction]} overwriteOnly={true} propKey="personalAccessToken"