From: guillaume-peoch-sonarsource Date: Thu, 12 Jan 2023 16:09:24 +0000 (+0100) Subject: [NO JIRA] Remove second devops instance warning X-Git-Tag: 9.9.0.65466~42 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d201300a097e97361d6dd49a3054be3c5e532b1e;p=sonarqube.git [NO JIRA] Remove second devops instance warning --- diff --git a/server/sonar-web/src/main/js/apps/create/project/CreateProjectPage.tsx b/server/sonar-web/src/main/js/apps/create/project/CreateProjectPage.tsx index e5506523d0d..08fc333e5d7 100644 --- a/server/sonar-web/src/main/js/apps/create/project/CreateProjectPage.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/CreateProjectPage.tsx @@ -265,7 +265,6 @@ export class CreateProjectPage extends React.PureComponent void; afterSubmit: (data: AlmBindingDefinitionBase) => void; enforceValidation?: boolean; @@ -260,7 +259,7 @@ export default class AlmBindingDefinitionForm extends React.PureComponent void; onSubmit: () => void; onFieldChange: (fieldId: keyof AlmBindingDefinition, value: string) => void; @@ -98,8 +97,7 @@ export default class AlmBindingDefinitionFormRenderer extends React.PureComponen }; render() { - const { isUpdate, alreadyHaveInstanceConfigured, canSubmit, submitting, validationError } = - this.props; + const { isUpdate, canSubmit, submitting, validationError } = this.props; const header = translate('settings.almintegration.form.header', isUpdate ? 'edit' : 'create'); const handleSubmit = (event: React.SyntheticEvent) => { @@ -120,11 +118,6 @@ export default class AlmBindingDefinitionFormRenderer extends React.PureComponen
- {alreadyHaveInstanceConfigured && !isUpdate && ( - - {translate('settings.almintegration.form.second_instance_warning')} - - )} {this.renderForm()} {validationError && !canSubmit && ( diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTabRenderer.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTabRenderer.tsx index 052335fb123..2d22762356f 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTabRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTabRenderer.tsx @@ -118,7 +118,6 @@ export default function AlmTabRenderer(props: AlmTabRendererProps) { 0} onCancel={props.onCancel} afterSubmit={props.afterSubmit} /> diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmBindingDefinitionForm-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmBindingDefinitionForm-test.tsx index ee069f36793..7b76ad160bb 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmBindingDefinitionForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmBindingDefinitionForm-test.tsx @@ -211,7 +211,6 @@ function shallowRender(props: Partial = {}) { { expect(shallowRender()).toMatchSnapshot(); - expect(shallowRender({ alreadyHaveInstanceConfigured: true })).toMatchSnapshot('second instance'); expect(shallowRender({ submitting: true })).toMatchSnapshot('submitting'); expect(shallowRender({ isUpdate: true })).toMatchSnapshot('editing'); expect(shallowRender({ validationError: 'this is a validation error' })).toMatchSnapshot( @@ -80,7 +79,6 @@ function shallowRender(props: Partial = {}) { alm={AlmKeys.GitHub} isUpdate={false} canSubmit={false} - alreadyHaveInstanceConfigured={false} submitting={false} formData={mockGithubBindingDefinition()} onCancel={jest.fn()} diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmBindingDefinitionForm-test.tsx.snap b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmBindingDefinitionForm-test.tsx.snap index 19fc742ed32..f086eb31184 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmBindingDefinitionForm-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmBindingDefinitionForm-test.tsx.snap @@ -3,7 +3,6 @@ exports[`should render correctly: create 1`] = ` `; -exports[`should render correctly: second instance 1`] = ` - -
-
-

- settings.almintegration.form.header.create -

-
-
- - settings.almintegration.form.second_instance_warning - - -
-
- - settings.almintegration.form.save - - - - cancel - -
-
-
-`; - exports[`should render correctly: submitting 1`] = ` Developer Settings > GitHub Apps settings.almintegration.form.header.create=Create a configuration settings.almintegration.form.header.edit=Edit the configuration -settings.almintegration.form.second_instance_warning=Binding more than one instance of a DevOps Platform will deactivate the import of repositories from that DevOps Platform. settings.almintegration.form.name.azure=Configuration name settings.almintegration.form.name.azure.help=Give your configuration a clear and succinct name. This name will be used at project level to identify the correct configured Azure instance for a project. settings.almintegration.form.choose_bitbucket_variant=Select which variant you want to configure