From: Jeremy Davis Date: Thu, 28 Jan 2021 17:24:21 +0000 (+0100) Subject: SONAR-14364 Enable project import in CE X-Git-Tag: 8.7.0.41497~62 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=18a62058532e9c898a8a4972f2bd7347bf9f51b9;p=sonarqube.git SONAR-14364 Enable project import in CE --- 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 d6105855b00..c2bdfd909e2 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 @@ -37,7 +37,7 @@ import './style.css'; import { CreateProjectModes } from './types'; interface Props extends Pick { - appState: Pick; + appState: Pick; currentUser: T.LoggedInUser; } @@ -60,13 +60,8 @@ export class CreateProjectPage extends React.PureComponent { }; componentDidMount() { - const { - appState: { branchesEnabled } - } = this.props; this.mounted = true; - if (branchesEnabled) { - this.fetchAlmBindings(); - } + this.fetchAlmBindings(); } componentWillUnmount() { @@ -192,10 +187,7 @@ export class CreateProjectPage extends React.PureComponent { } render() { - const { - appState: { branchesEnabled }, - location - } = this.props; + const { location } = this.props; const mode: CreateProjectModes | undefined = location.query?.mode; return ( @@ -203,7 +195,7 @@ export class CreateProjectPage extends React.PureComponent {
- {this.renderForm(branchesEnabled ? mode : CreateProjectModes.Manual)} + {this.renderForm(mode)}
); diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/CreateProjectPage-test.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/CreateProjectPage-test.tsx index 7f43cf60b59..e59baf2bb09 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/CreateProjectPage-test.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/CreateProjectPage-test.tsx @@ -36,11 +36,6 @@ it('should render correctly', () => { expect(getAlmSettings).toBeCalled(); }); -it('should render correctly if no branch support', () => { - expect(shallowRender({ appState: { branchesEnabled: false } })).toMatchSnapshot(); - expect(getAlmSettings).not.toBeCalled(); -}); - it('should render correctly if the manual method is selected', () => { expect( shallowRender({ @@ -82,7 +77,7 @@ it('should render correctly if the GitLab method is selected', () => { function shallowRender(props: Partial = {}) { return shallow( `; -exports[`should render correctly if no branch support 1`] = ` - - - -
- -
-
-`; - exports[`should render correctly if the Azure method is selected 1`] = ` ; className?: string; currentUser: T.LoggedInUser; } @@ -71,18 +69,15 @@ export class ProjectCreationMenu extends React.PureComponent { }; fetchAlmBindings = async () => { - const { - appState: { branchesEnabled }, - currentUser - } = this.props; + const { currentUser } = this.props; const canCreateProject = hasGlobalPermission(currentUser, PROJECT_CREATION_PERMISSION); // getAlmSettings requires branchesEnabled - if (!canCreateProject || !branchesEnabled) { + if (!canCreateProject) { return; } - const almSettings = await getAlmSettings(); + const almSettings: AlmSettingsInstance[] = await getAlmSettings().catch(() => []); // Import is only available if exactly one binding is configured const boundAlms = IMPORT_COMPATIBLE_ALMS.filter(key => { @@ -129,4 +124,4 @@ export class ProjectCreationMenu extends React.PureComponent { } } -export default withAppState(withCurrentUser(ProjectCreationMenu)); +export default withCurrentUser(ProjectCreationMenu); diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCreationMenu-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCreationMenu-test.tsx index 51deead6bf2..5b2825de4b2 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCreationMenu-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/ProjectCreationMenu-test.tsx @@ -21,7 +21,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import { getAlmSettings } from '../../../../api/alm-settings'; -import { mockAppState, mockLoggedInUser } from '../../../../helpers/testMocks'; +import { mockLoggedInUser } from '../../../../helpers/testMocks'; import { AlmKeys } from '../../../../types/alm-settings'; import { ProjectCreationMenu } from '../ProjectCreationMenu'; @@ -52,12 +52,6 @@ it('should not fetch alm bindings if user cannot create projects', async () => { expect(getAlmSettings).not.toBeCalled(); }); -it('should not fetch alm bindings if branches are not enabled', async () => { - const wrapper = shallowRender({ appState: mockAppState({ branchesEnabled: false }) }); - await waitAndUpdate(wrapper); - expect(getAlmSettings).not.toBeCalled(); -}); - it('should filter alm bindings appropriately', async () => { (getAlmSettings as jest.Mock).mockResolvedValueOnce([ { alm: AlmKeys.Azure }, @@ -77,7 +71,6 @@ it('should filter alm bindings appropriately', async () => { function shallowRender(overrides: Partial = {}) { return shallow( diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/PageHeader-test.tsx.snap b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/PageHeader-test.tsx.snap index 2b6933ea872..7f5915cf34f 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/PageHeader-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/PageHeader-test.tsx.snap @@ -18,7 +18,7 @@ exports[`should render correctly 1`] = `
- - - void; @@ -55,6 +59,48 @@ const STATUS_ICON = { [AlmSettingsBindingStatusType.Success]: }; +function getPRDecorationFeatureStatus( + branchesEnabled: boolean, + type: AlmSettingsBindingStatusType.Success | AlmSettingsBindingStatusType.Failure +) { + if (branchesEnabled) { + return STATUS_ICON[type]; + } + + return ( +
+ + {translate('settings.almintegration.feature.pr_decoration.disabled')} + + + {translate( + 'settings.almintegration.feature.pr_decoration.disabled.no_branches.link' + )} + + ) + }} + /> + } + /> +
+ ); +} + function getImportFeatureStatus( definition: AlmBindingDefinition, multipleDefinitions: boolean, @@ -72,7 +118,9 @@ function getImportFeatureStatus( />
); - } else if (!definition.url) { + } + + if (!definition.url) { return (
@@ -84,13 +132,13 @@ function getImportFeatureStatus( />
); - } else { - return STATUS_ICON[type]; } + + return STATUS_ICON[type]; } export default function AlmBindingDefinitionBox(props: AlmBindingDefinitionBoxProps) { - const { alm, definition, multipleDefinitions, status = DEFAULT_STATUS } = props; + const { alm, branchesEnabled, definition, multipleDefinitions, status = DEFAULT_STATUS } = props; const importFeatureTitle = alm === AlmKeys.GitLab @@ -129,12 +177,12 @@ export default function AlmBindingDefinitionBox(props: AlmBindingDefinitionBoxPr <> {status.type !== AlmSettingsBindingStatusType.Warning && (
- -
- {importFeatureTitle} - {STATUS_ICON[status.type]} -
-
+
+ + {importFeatureTitle} + + {getPRDecorationFeatureStatus(branchesEnabled, status.type)} +
{ }; fetchPullRequestDecorationSetting = () => { - const { - appState: { branchesEnabled } - } = this.props; - - if (!branchesEnabled) { - return Promise.resolve(); - } - this.setState({ loadingAlmDefinitions: true }); return getAlmDefinitions() .then(definitions => { diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegrationRenderer.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegrationRenderer.tsx index b13c8a9cfb1..5f4bd44a36e 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegrationRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegrationRenderer.tsx @@ -64,7 +64,8 @@ const tabs = [ /> GitHub - ) + ), + requiresBranchesEnabled: false }, { key: AlmKeys.Bitbucket, @@ -79,7 +80,7 @@ const tabs = [ Bitbucket Server ), - requiresBranchesEnabled: true + requiresBranchesEnabled: false }, { key: AlmKeys.Azure, @@ -94,7 +95,7 @@ const tabs = [ Azure DevOps Server ), - requiresBranchesEnabled: true + requiresBranchesEnabled: false }, { key: AlmKeys.GitLab, @@ -108,7 +109,8 @@ const tabs = [ /> GitLab - ) + ), + requiresBranchesEnabled: false } ]; @@ -143,6 +145,7 @@ export default function AlmIntegrationRenderer(props: AlmIntegrationRendererProp {currentAlm === AlmKeys.Azure && ( { alm: AlmKeys; + branchesEnabled: boolean; createConfiguration: (data: B) => Promise; defaultBinding: B; definitions: B[]; @@ -109,6 +110,7 @@ export default class AlmTab extends React.PureCo render() { const { alm, + branchesEnabled, defaultBinding, definitions, definitionStatus, @@ -124,6 +126,7 @@ export default class AlmTab extends React.PureCo return ( { alm: AlmKeys; + branchesEnabled: boolean; definitionStatus: T.Dict; editedDefinition?: B; defaultBinding: B; @@ -62,6 +60,7 @@ export default function AlmTabRenderer( ) { const { alm, + branchesEnabled, definitions, definitionStatus, editedDefinition, @@ -74,25 +73,6 @@ export default function AlmTabRenderer( } = props; const preventCreation = loadingProjectCount || (!multipleAlmEnabled && definitions.length > 0); - const creationTooltip = preventCreation ? ( - - {translate('settings.almintegration.create.tooltip.link')} - - ), - alm: translate('alm', alm) - }} - /> - ) : null; return (
@@ -102,18 +82,19 @@ export default function AlmTabRenderer( )}
0 ? 'spacer-bottom text-right' : 'big-spacer-top'}> - + - +
{definitions.map(def => ( 1} diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AzureTab.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AzureTab.tsx index 4ffb60a04ae..5be30a1be4b 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AzureTab.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AzureTab.tsx @@ -32,6 +32,7 @@ import AlmTab from './AlmTab'; import AzureForm from './AzureForm'; export interface AzureTabProps { + branchesEnabled: boolean; definitions: AzureBindingDefinition[]; definitionStatus: T.Dict; loadingAlmDefinitions: boolean; @@ -44,6 +45,7 @@ export interface AzureTabProps { export default function AzureTab(props: AzureTabProps) { const { + branchesEnabled, multipleAlmEnabled, definitions, definitionStatus, @@ -55,6 +57,7 @@ export default function AzureTab(props: AzureTabProps) {
; loadingAlmDefinitions: boolean; @@ -46,6 +47,7 @@ export interface BitbucketTabProps { export default function BitbucketTab(props: BitbucketTabProps) { const { + branchesEnabled, multipleAlmEnabled, definitions, definitionStatus, @@ -57,6 +59,7 @@ export default function BitbucketTab(props: BitbucketTabProps) {
; + preventCreation: boolean; +} + +export function CreationTooltip(props: CreationTooltipProps) { + const { + alm, + appState: { edition }, + children, + preventCreation + } = props; + + const sourceEdition = edition ? EditionKey[edition] : undefined; + + return ( + + {translate('settings.almintegration.create.tooltip.link')} + + ), + alm: translate('alm', alm) + }} + /> + ) : null + } + mouseLeaveDelay={0.25}> + {children} + + ); +} + +export default withAppState(CreationTooltip); diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/GithubTab.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/GithubTab.tsx index 7811a6eafb6..5a2371242da 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/GithubTab.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/GithubTab.tsx @@ -59,47 +59,44 @@ export default function GithubTab(props: GithubTabProps) { return (
- {branchesEnabled && ( - <> - } + help={ + + {translate('learn_more')} + + ) }} - definitions={definitions} - definitionStatus={definitionStatus} - form={childProps => } - help={ - - {translate('learn_more')} - - ) - }} - /> - } - loadingAlmDefinitions={loadingAlmDefinitions} - loadingProjectCount={loadingProjectCount} - multipleAlmEnabled={multipleAlmEnabled} - onCheck={props.onCheck} - onDelete={props.onDelete} - onUpdateDefinitions={props.onUpdateDefinitions} - updateConfiguration={updateGithubConfiguration} /> + } + loadingAlmDefinitions={loadingAlmDefinitions} + loadingProjectCount={loadingProjectCount} + multipleAlmEnabled={multipleAlmEnabled} + onCheck={props.onCheck} + onDelete={props.onDelete} + onUpdateDefinitions={props.onUpdateDefinitions} + updateConfiguration={updateGithubConfiguration} + /> -
- - )} +
- {branchesEnabled && ( - <> - } - help={ - - {translate('learn_more')} - - ) - }} - /> - } - loadingAlmDefinitions={loadingAlmDefinitions} - loadingProjectCount={loadingProjectCount} - multipleAlmEnabled={multipleAlmEnabled} - onCheck={props.onCheck} - onDelete={props.onDelete} - onUpdateDefinitions={props.onUpdateDefinitions} - updateConfiguration={updateGitlabConfiguration} + } + help={ + + {translate('learn_more')} + + ) + }} /> + } + loadingAlmDefinitions={loadingAlmDefinitions} + loadingProjectCount={loadingProjectCount} + multipleAlmEnabled={multipleAlmEnabled} + onCheck={props.onCheck} + onDelete={props.onDelete} + onUpdateDefinitions={props.onUpdateDefinitions} + updateConfiguration={updateGitlabConfiguration} + /> -
- - )} +
{ expect( shallowRender({ alm: AlmKeys.Azure, definition: mockAzureBindingDefinition() }) ).toMatchSnapshot('Azure DevOps'); + + expect( + shallowRender({ + branchesEnabled: false, + status: mockAlmSettingsBindingStatus({ + alertSuccess: true, + type: AlmSettingsBindingStatusType.Success + }) + }) + ).toMatchSnapshot('success with branches disabled'); }); function shallowRender(props: Partial = {}) { return shallow( ['props']> = return shallow>( ( return shallow( { function shallowRender(props: Partial = {}) { return shallow( { function shallowRender(props: Partial = {}) { return shallow( { + expect(shallowRender()).toMatchSnapshot(); + expect(shallowRender({ preventCreation: false })).toMatchSnapshot(); +}); + +function shallowRender(props: Partial = {}) { + return shallow( + + Child + + ); +} diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/GithubTab-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/GithubTab-test.tsx index 4ab68486735..3785bb78608 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/GithubTab-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/GithubTab-test.tsx @@ -24,7 +24,6 @@ import GithubTab, { GithubTabProps } from '../GithubTab'; it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot('with branch support'); - expect(shallowRender({ branchesEnabled: false })).toMatchSnapshot('without branch support'); }); function shallowRender(props: Partial = {}) { diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/GitlabTab-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/GitlabTab-test.tsx index 8ea03aa327d..a3a9b6e80a3 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/GitlabTab-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/GitlabTab-test.tsx @@ -24,7 +24,6 @@ import GitlabTab, { GitlabTabProps } from '../GitlabTab'; it('should render correctly', () => { expect(shallowRender()).toMatchSnapshot('with branch support'); - expect(shallowRender({ branchesEnabled: false })).toMatchSnapshot('without branch support'); expect( shallowRender({ definitions: [mockGitlabBindingDefinition({ url: 'https://gitlab.com/api/v4' })] diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmBindingDefinitionBox-test.tsx.snap b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmBindingDefinitionBox-test.tsx.snap index 5a3af1e5260..07cd7a44076 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmBindingDefinitionBox-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmBindingDefinitionBox-test.tsx.snap @@ -119,18 +119,20 @@ exports[`should render correctly: error 1`] = `
- -
- settings.almintegration.feature.pr_decoration.title - -
-
+ + settings.almintegration.feature.pr_decoration.title + + + +
- -
- settings.almintegration.feature.pr_decoration.title - -
-
+ + settings.almintegration.feature.pr_decoration.title + +
+ +
- + + + settings.almintegration.feature.pr_decoration.title + + + +
+
+ + + settings.almintegration.feature.alm_repo_import.title + + + +
+
+
+ + settings.almintegration.configuration_valid + +
+ +
+`; + +exports[`should render correctly: success with branches disabled 1`] = ` +
+
+ + +
+
+

+ key +

+ + http://github.enterprise.com + +
+
+
+ + + settings.almintegration.feature.pr_decoration.title + +
- settings.almintegration.feature.pr_decoration.title - + settings.almintegration.feature.pr_decoration.disabled + + + settings.almintegration.feature.pr_decoration.disabled.no_branches.link + , + } + } + /> + } />
- +
GitHub , + "requiresBranchesEnabled": false, }, Object { "key": "bitbucket", @@ -44,7 +45,7 @@ exports[`should render correctly: azure 1`] = ` /> Bitbucket Server , - "requiresBranchesEnabled": true, + "requiresBranchesEnabled": false, }, Object { "key": "azure", @@ -57,7 +58,7 @@ exports[`should render correctly: azure 1`] = ` /> Azure DevOps Server , - "requiresBranchesEnabled": true, + "requiresBranchesEnabled": false, }, Object { "key": "gitlab", @@ -70,11 +71,13 @@ exports[`should render correctly: azure 1`] = ` /> GitLab , + "requiresBranchesEnabled": false, }, ] } /> GitHub , + "requiresBranchesEnabled": false, }, Object { "key": "bitbucket", @@ -131,7 +135,7 @@ exports[`should render correctly: bitbucket 1`] = ` /> Bitbucket Server , - "requiresBranchesEnabled": true, + "requiresBranchesEnabled": false, }, Object { "key": "azure", @@ -144,7 +148,7 @@ exports[`should render correctly: bitbucket 1`] = ` /> Azure DevOps Server , - "requiresBranchesEnabled": true, + "requiresBranchesEnabled": false, }, Object { "key": "gitlab", @@ -157,11 +161,13 @@ exports[`should render correctly: bitbucket 1`] = ` /> GitLab , + "requiresBranchesEnabled": false, }, ] } /> GitHub , + "requiresBranchesEnabled": false, }, Object { "key": "bitbucket", @@ -218,7 +225,7 @@ exports[`should render correctly: default 1`] = ` /> Bitbucket Server , - "requiresBranchesEnabled": true, + "requiresBranchesEnabled": false, }, Object { "key": "azure", @@ -231,7 +238,7 @@ exports[`should render correctly: default 1`] = ` /> Azure DevOps Server , - "requiresBranchesEnabled": true, + "requiresBranchesEnabled": false, }, Object { "key": "gitlab", @@ -244,6 +251,7 @@ exports[`should render correctly: default 1`] = ` /> GitLab , + "requiresBranchesEnabled": false, }, ] } @@ -294,6 +302,7 @@ exports[`should render correctly: delete modal 1`] = ` /> GitHub , + "requiresBranchesEnabled": false, }, Object { "key": "bitbucket", @@ -306,7 +315,7 @@ exports[`should render correctly: delete modal 1`] = ` /> Bitbucket Server , - "requiresBranchesEnabled": true, + "requiresBranchesEnabled": false, }, Object { "key": "azure", @@ -319,7 +328,7 @@ exports[`should render correctly: delete modal 1`] = ` /> Azure DevOps Server , - "requiresBranchesEnabled": true, + "requiresBranchesEnabled": false, }, Object { "key": "gitlab", @@ -332,6 +341,7 @@ exports[`should render correctly: delete modal 1`] = ` /> GitLab , + "requiresBranchesEnabled": false, }, ] } @@ -387,6 +397,7 @@ exports[`should render correctly: gitlab 1`] = ` /> GitHub , + "requiresBranchesEnabled": false, }, Object { "key": "bitbucket", @@ -399,7 +410,7 @@ exports[`should render correctly: gitlab 1`] = ` /> Bitbucket Server , - "requiresBranchesEnabled": true, + "requiresBranchesEnabled": false, }, Object { "key": "azure", @@ -412,7 +423,7 @@ exports[`should render correctly: gitlab 1`] = ` /> Azure DevOps Server , - "requiresBranchesEnabled": true, + "requiresBranchesEnabled": false, }, Object { "key": "gitlab", @@ -425,6 +436,7 @@ exports[`should render correctly: gitlab 1`] = ` /> GitLab , + "requiresBranchesEnabled": false, }, ] } @@ -475,6 +487,7 @@ exports[`should render correctly: loading 1`] = ` /> GitHub , + "requiresBranchesEnabled": false, }, Object { "key": "bitbucket", @@ -487,7 +500,7 @@ exports[`should render correctly: loading 1`] = ` /> Bitbucket Server , - "requiresBranchesEnabled": true, + "requiresBranchesEnabled": false, }, Object { "key": "azure", @@ -500,7 +513,7 @@ exports[`should render correctly: loading 1`] = ` /> Azure DevOps Server , - "requiresBranchesEnabled": true, + "requiresBranchesEnabled": false, }, Object { "key": "gitlab", @@ -513,6 +526,7 @@ exports[`should render correctly: loading 1`] = ` /> GitLab , + "requiresBranchesEnabled": false, }, ] } diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmTab-test.tsx.snap b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmTab-test.tsx.snap index 9c8ed1fce1d..76720ff1334 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmTab-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmTab-test.tsx.snap @@ -3,6 +3,7 @@ exports[`should render correctly 1`] = ` - - +
- - +
- - +
- - settings.almintegration.create.tooltip.link - , - } - } - /> - } + - +
- - +
- - settings.almintegration.create.tooltip.link - , - } - } - /> - } + - +
- - settings.almintegration.create.tooltip.link - , - } - } - /> - } + - +
- - settings.almintegration.create.tooltip.link - , - } - } - /> - } + - +
- - +
- - +
- - +
- - +
diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AzureTab-test.tsx.snap b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AzureTab-test.tsx.snap index 6740a5d3282..b282c815654 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AzureTab-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AzureTab-test.tsx.snap @@ -6,6 +6,7 @@ exports[`should render correctly 1`] = ` > + settings.almintegration.create.tooltip.link + , + } + } + /> + } +> + + Child + + +`; + +exports[`should render correctly 2`] = ` + + + Child + + +`; diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/GithubTab-test.tsx.snap b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/GithubTab-test.tsx.snap index e8575a55571..7ad5b337f71 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/GithubTab-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/GithubTab-test.tsx.snap @@ -6,6 +6,7 @@ exports[`should render correctly: with branch support 1`] = ` > `; - -exports[`should render correctly: without branch support 1`] = ` -
-
- -
-
-`; diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/GitlabTab-test.tsx.snap b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/GitlabTab-test.tsx.snap index d9e0818ec21..dfbd667ff1c 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/GitlabTab-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/GitlabTab-test.tsx.snap @@ -6,6 +6,7 @@ exports[`should render correctly: with URL 1`] = ` > `; - -exports[`should render correctly: without branch support 1`] = ` -
-
- -
-
-`; diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties index 42a36e41c0f..e43c3e42cc5 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -1126,6 +1126,9 @@ settings.almintegration.feature.pr_decoration.title=Pull Request Decoration settings.almintegration.feature.pr_decoration.description=Add analysis and a Quality Gate to your Pull Requests directly in your ALM provider's interface. settings.almintegration.feature.mr_decoration.title=Merge Request Decoration settings.almintegration.feature.mr_decoration.description=Add analysis and a Quality Gate to your Merge Requests directly in your ALM provider's interface. +settings.almintegration.feature.pr_decoration.disabled=Disabled +settings.almintegration.feature.pr_decoration.disabled.no_branches=Upgrade to {link} to enable this feature. +settings.almintegration.feature.pr_decoration.disabled.no_branches.link=Developer Edition settings.almintegration.feature.alm_repo_import.title=Import repositories from your ALM settings.almintegration.feature.alm_repo_import.description=Select repositories from your ALM, and import them into SonarQube. settings.almintegration.feature.alm_repo_import.disabled=Disabled