active: definitions.length === 1,
description: translate('settings.almintegration.feature.alm_repo_import.description'),
inactiveReason: translateWithParameters(
- 'onboarding.create_project.too_many_bbs_instances_X',
+ 'settings.almintegration.feature.alm_repo_import.bitbucket.wrong_count_x',
definitions.length
)
}
</>
) : (
translateWithParameters(
- 'settings.almintegration.feature.alm_repo_import.github.too_many_instances_x',
+ 'settings.almintegration.feature.alm_repo_import.github.wrong_count_x',
definitions.length
)
)
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { translate } from 'sonar-ui-common/helpers/l10n';
+import { FormattedMessage } from 'react-intl';
+import { Alert } from 'sonar-ui-common/components/ui/Alert';
+import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n';
import { createGitlabConfiguration, updateGitlabConfiguration } from '../../../../api/alm-settings';
import { AlmKeys, GitlabBindingDefinition } from '../../../../types/alm-settings';
import { ALM_INTEGRATION } from '../AdditionalCategoryKeys';
translate('settings.almintegration.table.column.gitlab.url')
]}
additionalColumnsKeys={['url']}
+ additionalTableInfo={
+ <Alert className="big-spacer-bottom width-50" variant="info">
+ <FormattedMessage
+ defaultMessage={translate(
+ 'settings.almintegration.feature.alm_repo_import.disabled_if_multiple_gitlab_instances'
+ )}
+ id="settings.almintegration.feature.alm_repo_import.disabled_if_multiple_gitlab_instances"
+ values={{
+ feature: (
+ <em>{translate('settings.almintegration.feature.alm_repo_import.title')}</em>
+ )
+ }}
+ />
+ </Alert>
+ }
alm={AlmKeys.GitLab}
createConfiguration={createGitlabConfiguration}
defaultBinding={{ key: '', personalAccessToken: '', url: '' }}
active: definitions.length > 0,
description: translate('settings.almintegration.feature.mr_decoration.description'),
inactiveReason: translate('settings.almintegration.feature.need_at_least_1_binding')
+ },
+ {
+ name: translate('settings.almintegration.feature.alm_repo_import.title'),
+ active: definitions.length === 1,
+ description: translate(
+ 'settings.almintegration.feature.alm_repo_import.description'
+ ),
+ inactiveReason: translateWithParameters(
+ 'settings.almintegration.feature.alm_repo_import.gitlab.wrong_count_x',
+ definitions.length
+ )
}
]}
form={childProps => <GitlabForm {...childProps} />}
Object {
"active": true,
"description": "settings.almintegration.feature.alm_repo_import.description",
- "inactiveReason": "onboarding.create_project.too_many_bbs_instances_X.1",
+ "inactiveReason": "settings.almintegration.feature.alm_repo_import.bitbucket.wrong_count_x.1",
"name": "settings.almintegration.feature.alm_repo_import.title",
},
]
"url",
]
}
+ additionalTableInfo={
+ <Alert
+ className="big-spacer-bottom width-50"
+ variant="info"
+ >
+ <FormattedMessage
+ defaultMessage="settings.almintegration.feature.alm_repo_import.disabled_if_multiple_gitlab_instances"
+ id="settings.almintegration.feature.alm_repo_import.disabled_if_multiple_gitlab_instances"
+ values={
+ Object {
+ "feature": <em>
+ settings.almintegration.feature.alm_repo_import.title
+ </em>,
+ }
+ }
+ />
+ </Alert>
+ }
alm="gitlab"
createConfiguration={[Function]}
defaultBinding={
"inactiveReason": "settings.almintegration.feature.need_at_least_1_binding",
"name": "settings.almintegration.feature.mr_decoration.title",
},
+ Object {
+ "active": true,
+ "description": "settings.almintegration.feature.alm_repo_import.description",
+ "inactiveReason": "settings.almintegration.feature.alm_repo_import.gitlab.wrong_count_x.1",
+ "name": "settings.almintegration.feature.alm_repo_import.title",
+ },
]
}
form={[Function]}
settings.almintegration.feature.alm_repo_import.description=Select repositories from your ALM, and import them into SonarQube.
settings.almintegration.feature.alm_repo_import.disabled_if_multiple_bbs_instances=Connecting to multiple Bitbucket Server instances will deactivate the {feature} feature. Projects will have to be set up manually.
settings.almintegration.feature.alm_repo_import.disabled_if_multiple_github_instances=Connecting to multiple GitHub instances will deactivate the {feature} feature. Projects will have to be set up manually.
-settings.almintegration.feature.alm_repo_import.github.too_many_instances_x=You must have exactly 1 GitHub instance configured in order to use this method. You currently have {0}.
+settings.almintegration.feature.alm_repo_import.disabled_if_multiple_gitlab_instances=Connecting to multiple GitLab instances will deactivate the {feature} feature. Projects will have to be set up manually.
+settings.almintegration.feature.alm_repo_import.bitbucket.wrong_count_x=You must have exactly 1 Bitbucket Server instance configured in order to use this method. You currently have {0}.
+settings.almintegration.feature.alm_repo_import.github.wrong_count_x=You must have exactly 1 GitHub instance configured in order to use this method. You currently have {0}.
+settings.almintegration.feature.alm_repo_import.gitlab.wrong_count_x=You must have exactly 1 GitLab instance configured in order to use this method. You currently have {0}.
settings.almintegration.feature.alm_repo_import.github.requires_fields=Your configured instance must be provided with the App's {clientId} and {clientSecret}.
-
settings.pr_decoration.binding.category=Pull Request Decoration
settings.pr_decoration.binding.no_bindings=This feature must first be enabled in the global settings. {link}
settings.pr_decoration.binding.title=Pull Request Decoration