import java.util.List; | import java.util.List; | ||||
import java.util.function.Supplier; | import java.util.function.Supplier; | ||||
import javax.annotation.CheckForNull; | import javax.annotation.CheckForNull; | ||||
import org.sonar.api.CoreProperties; | |||||
import org.sonar.api.PropertyType; | import org.sonar.api.PropertyType; | ||||
import org.sonar.api.config.Configuration; | import org.sonar.api.config.Configuration; | ||||
import org.sonar.api.config.PropertyDefinition; | import org.sonar.api.config.PropertyDefinition; | ||||
public static final String WORKSPACE_ALLOWED_LIST = "sonar.auth.bitbucket.workspaces"; | public static final String WORKSPACE_ALLOWED_LIST = "sonar.auth.bitbucket.workspaces"; | ||||
public static final String DEFAULT_API_URL = "https://api.bitbucket.org/"; | public static final String DEFAULT_API_URL = "https://api.bitbucket.org/"; | ||||
public static final String DEFAULT_WEB_URL = "https://bitbucket.org/"; | public static final String DEFAULT_WEB_URL = "https://bitbucket.org/"; | ||||
public static final String CATEGORY = "authentication"; | |||||
public static final String SUBCATEGORY = "bitbucket"; | public static final String SUBCATEGORY = "bitbucket"; | ||||
private final Configuration config; | private final Configuration config; | ||||
PropertyDefinition.builder(ENABLED) | PropertyDefinition.builder(ENABLED) | ||||
.name("Enabled") | .name("Enabled") | ||||
.description("Enable Bitbucket users to login. Value is ignored if consumer key and secret are not defined.") | .description("Enable Bitbucket users to login. Value is ignored if consumer key and secret are not defined.") | ||||
.category(CoreProperties.CATEGORY_ALM_INTEGRATION) | |||||
.category(CATEGORY) | |||||
.subCategory(SUBCATEGORY) | .subCategory(SUBCATEGORY) | ||||
.type(PropertyType.BOOLEAN) | .type(PropertyType.BOOLEAN) | ||||
.defaultValue(String.valueOf(false)) | .defaultValue(String.valueOf(false)) | ||||
PropertyDefinition.builder(CONSUMER_KEY) | PropertyDefinition.builder(CONSUMER_KEY) | ||||
.name("OAuth consumer key") | .name("OAuth consumer key") | ||||
.description("Consumer key provided by Bitbucket when registering the consumer.") | .description("Consumer key provided by Bitbucket when registering the consumer.") | ||||
.category(CoreProperties.CATEGORY_ALM_INTEGRATION) | |||||
.category(CATEGORY) | |||||
.subCategory(SUBCATEGORY) | .subCategory(SUBCATEGORY) | ||||
.index(2) | .index(2) | ||||
.build(), | .build(), | ||||
PropertyDefinition.builder(CONSUMER_SECRET) | PropertyDefinition.builder(CONSUMER_SECRET) | ||||
.name("OAuth consumer secret") | .name("OAuth consumer secret") | ||||
.description("Consumer secret provided by Bitbucket when registering the consumer.") | .description("Consumer secret provided by Bitbucket when registering the consumer.") | ||||
.category(CoreProperties.CATEGORY_ALM_INTEGRATION) | |||||
.category(CATEGORY) | |||||
.subCategory(SUBCATEGORY) | .subCategory(SUBCATEGORY) | ||||
.index(3) | .index(3) | ||||
.build(), | .build(), | ||||
PropertyDefinition.builder(ALLOW_USERS_TO_SIGN_UP) | PropertyDefinition.builder(ALLOW_USERS_TO_SIGN_UP) | ||||
.name("Allow users to sign-up") | .name("Allow users to sign-up") | ||||
.description("Allow new users to authenticate. When set to 'false', only existing users will be able to authenticate.") | .description("Allow new users to authenticate. When set to 'false', only existing users will be able to authenticate.") | ||||
.category(CoreProperties.CATEGORY_ALM_INTEGRATION) | |||||
.category(CATEGORY) | |||||
.subCategory(SUBCATEGORY) | .subCategory(SUBCATEGORY) | ||||
.type(PropertyType.BOOLEAN) | .type(PropertyType.BOOLEAN) | ||||
.defaultValue(String.valueOf(true)) | .defaultValue(String.valueOf(true)) | ||||
PropertyDefinition.builder(WORKSPACE_ALLOWED_LIST) | PropertyDefinition.builder(WORKSPACE_ALLOWED_LIST) | ||||
.name("Workspaces") | .name("Workspaces") | ||||
.description("Only members of at least one of these workspace will be able to authenticate. Keep empty to disable workspace restriction. You can use either the workspace name, or the workspace slug (ex: https://bitbucket.org/{workspace-slug}).") | .description("Only members of at least one of these workspace will be able to authenticate. Keep empty to disable workspace restriction. You can use either the workspace name, or the workspace slug (ex: https://bitbucket.org/{workspace-slug}).") | ||||
.category(CoreProperties.CATEGORY_ALM_INTEGRATION) | |||||
.category(CATEGORY) | |||||
.subCategory(SUBCATEGORY) | .subCategory(SUBCATEGORY) | ||||
.multiValues(true) | .multiValues(true) | ||||
.index(5) | .index(5) |
import java.util.List; | import java.util.List; | ||||
import javax.annotation.CheckForNull; | import javax.annotation.CheckForNull; | ||||
import javax.annotation.Nullable; | import javax.annotation.Nullable; | ||||
import org.sonar.api.CoreProperties; | |||||
import org.sonar.api.config.Configuration; | import org.sonar.api.config.Configuration; | ||||
import org.sonar.api.config.PropertyDefinition; | import org.sonar.api.config.PropertyDefinition; | ||||
public static final String WEB_URL = "sonar.auth.github.webUrl"; | public static final String WEB_URL = "sonar.auth.github.webUrl"; | ||||
public static final String ORGANIZATIONS = "sonar.auth.github.organizations"; | public static final String ORGANIZATIONS = "sonar.auth.github.organizations"; | ||||
private static final String CATEGORY = CoreProperties.CATEGORY_ALM_INTEGRATION; | |||||
private static final String CATEGORY = "authentication"; | |||||
private static final String SUBCATEGORY = "github"; | private static final String SUBCATEGORY = "github"; | ||||
private final Configuration configuration; | private final Configuration configuration; |
import java.util.Arrays; | import java.util.Arrays; | ||||
import java.util.List; | import java.util.List; | ||||
import org.sonar.api.CoreProperties; | |||||
import org.sonar.api.PropertyType; | import org.sonar.api.PropertyType; | ||||
import org.sonar.api.config.Configuration; | import org.sonar.api.config.Configuration; | ||||
import org.sonar.api.config.PropertyDefinition; | import org.sonar.api.config.PropertyDefinition; | ||||
public static final String GITLAB_AUTH_ALLOW_USERS_TO_SIGNUP = "sonar.auth.gitlab.allowUsersToSignUp"; | public static final String GITLAB_AUTH_ALLOW_USERS_TO_SIGNUP = "sonar.auth.gitlab.allowUsersToSignUp"; | ||||
public static final String GITLAB_AUTH_SYNC_USER_GROUPS = "sonar.auth.gitlab.groupsSync"; | public static final String GITLAB_AUTH_SYNC_USER_GROUPS = "sonar.auth.gitlab.groupsSync"; | ||||
private static final String CATEGORY = CoreProperties.CATEGORY_ALM_INTEGRATION; | |||||
private static final String CATEGORY = "authentication"; | |||||
private static final String SUBCATEGORY = "gitlab"; | private static final String SUBCATEGORY = "gitlab"; | ||||
private final Configuration configuration; | private final Configuration configuration; |
public static final String SERVICE_PROVIDER_CERTIFICATE = "sonar.auth.saml.sp.certificate.secured"; | public static final String SERVICE_PROVIDER_CERTIFICATE = "sonar.auth.saml.sp.certificate.secured"; | ||||
public static final String SERVICE_PROVIDER_PRIVATE_KEY = "sonar.auth.saml.sp.privateKey.secured"; | public static final String SERVICE_PROVIDER_PRIVATE_KEY = "sonar.auth.saml.sp.privateKey.secured"; | ||||
public static final String CATEGORY = "security"; | |||||
public static final String CATEGORY = "authentication"; | |||||
public static final String SUBCATEGORY = "saml"; | public static final String SUBCATEGORY = "saml"; | ||||
private final Configuration configuration; | private final Configuration configuration; |
- **Permissions** – Grant **Read** access for the **Pull requests** permission. | - **Permissions** – Grant **Read** access for the **Pull requests** permission. | ||||
### Setting your global DevOps Platform Integration settings | ### Setting your global DevOps Platform Integration settings | ||||
To set your global DevOps Platform Integration settings, navigate to **Administration > DevOps Platform Integrations**, select the **Bitbucket** tab, and select **Bitbucket Cloud** as the variant you want to configure. From here, specify the following settings: | |||||
To set your global DevOps Platform Integration settings, navigate to **Administration > Configuration > General Settings > DevOps Platform Integrations**, select the **Bitbucket** tab, and select **Bitbucket Cloud** as the variant you want to configure. From here, specify the following settings: | |||||
- **Configuration Name** (Enterprise and Data Center Edition only) – The name used to identify your Bitbucket Cloud configuration at the project level. Use something succinct and easily recognizable. | - **Configuration Name** (Enterprise and Data Center Edition only) – The name used to identify your Bitbucket Cloud configuration at the project level. Use something succinct and easily recognizable. | ||||
- **Workspace ID** – The workspace ID is part of your bitbucket cloud URL `https://bitbucket.org/{WORKSPACE-ID}/{repository-slug}` | - **Workspace ID** – The workspace ID is part of your bitbucket cloud URL `https://bitbucket.org/{WORKSPACE-ID}/{repository-slug}` | ||||
| If you're using the same OAuth consumer for authentication and importing projects/reporting status to pull requests, make sure that the **This is a private consumer** box is checked and **Read** access for the **Pull requests** permission is granted. | | If you're using the same OAuth consumer for authentication and importing projects/reporting status to pull requests, make sure that the **This is a private consumer** box is checked and **Read** access for the **Pull requests** permission is granted. | ||||
### Setting your authentication settings in SonarQube | ### Setting your authentication settings in SonarQube | ||||
To set your global authentication settings, navigate to **Administration > DevOps Platform Integrations** and select the **Bitbucket** tab. Scroll down to the **Bitbucket Authentication** section and update the following settings: | |||||
To set your global authentication settings, navigate to **Administration > Configuration > General Settings > Authentication > Bitbucket Cloud Authentication** and update the following settings: | |||||
- **Enabled** - set to true. | - **Enabled** - set to true. | ||||
- **OAuth consumer key** - enter the **Key** from your OAuth consumer page in Bitbucket. | - **OAuth consumer key** - enter the **Key** from your OAuth consumer page in Bitbucket. |
1. Add a personal access token for importing repositories | 1. Add a personal access token for importing repositories | ||||
### Setting your global DevOps Platform Integration settings | ### Setting your global DevOps Platform Integration settings | ||||
To set your global DevOps Platform Integration settings, navigate to **Administration > DevOps Platform Integrations**, select the **Bitbucket** tab, and select **Bitbucket Server** as the variant you want to configure. From here, specify the following settings: | |||||
To set your global DevOps Platform Integration settings, navigate to **Administration > Configuration > General Settings > DevOps Platform Integrations**, select the **Bitbucket** tab, and select **Bitbucket Server** as the variant you want to configure. From here, specify the following settings: | |||||
- **Configuration Name** (Enterprise and Data Center Edition only) – The name used to identify your Bitbucket Server configuration at the project level. Use something succinct and easily recognizable. | - **Configuration Name** (Enterprise and Data Center Edition only) – The name used to identify your Bitbucket Server configuration at the project level. Use something succinct and easily recognizable. | ||||
- **Bitbucket Server URL** – your instances URL. For example, `https://bitbucket-server.your-company.com`. | - **Bitbucket Server URL** – your instances URL. For example, `https://bitbucket-server.your-company.com`. |
To update your global SonarQube settings: | To update your global SonarQube settings: | ||||
Navigate to **Administration > Configuration > General Settings > DevOps Platform Integrations > GitHub > GitHub Authentication** and update the following: | |||||
Navigate to **Administration > Configuration > General Settings > Authentication > GitHub Authentication** and update the following: | |||||
1. **Enabled** – set the switch to `true`. | 1. **Enabled** – set the switch to `true`. | ||||
1. **Client ID** – the Client ID is found below the GitHub App ID on your GitHub App's page. | 1. **Client ID** – the Client ID is found below the GitHub App ID on your GitHub App's page. | ||||
After creating your app, update your global SonarQube settings: | After creating your app, update your global SonarQube settings: | ||||
Navigate to **Administration > Configuration > General Settings > DevOps Platform Integrations > GitHub > GitHub Authentication** and update the following: | |||||
Navigate to **Administration > Configuration > General Settings > Authentication > GitHub Authentication** and update the following: | |||||
1. **Enabled** – set the switch to `true`. | 1. **Enabled** – set the switch to `true`. | ||||
1. **Client ID** – the Client ID is found below the GitHub App ID on your GitHub App's page. | 1. **Client ID** – the Client ID is found below the GitHub App ID on your GitHub App's page. |
- **Redirect URI** – enter your SonarQube URL with the path `/oauth2/callback/gitlab`. For example, `https://sonarqube.mycompany.com/oauth2/callback/gitlab`. | - **Redirect URI** – enter your SonarQube URL with the path `/oauth2/callback/gitlab`. For example, `https://sonarqube.mycompany.com/oauth2/callback/gitlab`. | ||||
- **Scopes** – select **api** if you plan to enable group synchronization. Select **read_user** if you only plan to delegate authentication. | - **Scopes** – select **api** if you plan to enable group synchronization. Select **read_user** if you only plan to delegate authentication. | ||||
After saving your application, GitLab takes you to the app's page. Here you find your **Application ID** and **Secret**. Keep these handy, open your SonarQube instance, and navigate to **Administration > Configuration > General Settings > DevOps Platform Integrations > GitLab > Authentication**. Set the following settings to finish setting up GitLab authentication: | |||||
After saving your application, GitLab takes you to the app's page. Here you find your **Application ID** and **Secret**. Keep these handy, open your SonarQube instance, and navigate to **Administration > Configuration > General Settings > Authentication > GitLab Authentication**. Set the following settings to finish setting up GitLab authentication: | |||||
- **Enabled** – set to `true`. | - **Enabled** – set to `true`. | ||||
- **Application ID** – the Application ID is found on your GitLab app's page. | - **Application ID** – the Application ID is found on your GitLab app's page. |
renderComponent: getAlmIntegrationComponent, | renderComponent: getAlmIntegrationComponent, | ||||
availableGlobally: true, | availableGlobally: true, | ||||
availableForProject: false, | availableForProject: false, | ||||
displayTab: false | |||||
displayTab: true | |||||
}, | }, | ||||
{ | { | ||||
key: PULL_REQUEST_DECORATION_BINDING_CATEGORY, | key: PULL_REQUEST_DECORATION_BINDING_CATEGORY, |
AlmSettingsBindingStatusType | AlmSettingsBindingStatusType | ||||
} from '../../../../types/alm-settings'; | } from '../../../../types/alm-settings'; | ||||
import { AppState } from '../../../../types/appstate'; | import { AppState } from '../../../../types/appstate'; | ||||
import { ExtendedSettingDefinition } from '../../../../types/settings'; | |||||
import { Dict } from '../../../../types/types'; | import { Dict } from '../../../../types/types'; | ||||
import AlmIntegrationRenderer from './AlmIntegrationRenderer'; | import AlmIntegrationRenderer from './AlmIntegrationRenderer'; | ||||
interface Props { | interface Props { | ||||
appState: AppState; | appState: AppState; | ||||
definitions: ExtendedSettingDefinition[]; | |||||
location: Location; | location: Location; | ||||
router: Router; | router: Router; | ||||
} | } | ||||
render() { | render() { | ||||
const { | const { | ||||
appState: { branchesEnabled, multipleAlmEnabled }, | |||||
definitions: settingsDefinitions | |||||
appState: { branchesEnabled, multipleAlmEnabled } | |||||
} = this.props; | } = this.props; | ||||
const { | const { | ||||
currentAlmTab, | currentAlmTab, | ||||
loadingAlmDefinitions={loadingAlmDefinitions} | loadingAlmDefinitions={loadingAlmDefinitions} | ||||
loadingProjectCount={loadingProjectCount} | loadingProjectCount={loadingProjectCount} | ||||
projectCount={projectCount} | projectCount={projectCount} | ||||
settingsDefinitions={settingsDefinitions} | |||||
/> | /> | ||||
); | ); | ||||
} | } |
AlmSettingsBindingDefinitions, | AlmSettingsBindingDefinitions, | ||||
AlmSettingsBindingStatus | AlmSettingsBindingStatus | ||||
} from '../../../../types/alm-settings'; | } from '../../../../types/alm-settings'; | ||||
import { ExtendedSettingDefinition } from '../../../../types/settings'; | |||||
import { Dict } from '../../../../types/types'; | import { Dict } from '../../../../types/types'; | ||||
import { AlmTabs } from './AlmIntegration'; | import { AlmTabs } from './AlmIntegration'; | ||||
import AlmTab from './AlmTab'; | import AlmTab from './AlmTab'; | ||||
onSelectAlmTab: (alm: AlmTabs) => void; | onSelectAlmTab: (alm: AlmTabs) => void; | ||||
onUpdateDefinitions: () => void; | onUpdateDefinitions: () => void; | ||||
projectCount?: number; | projectCount?: number; | ||||
settingsDefinitions: ExtendedSettingDefinition[]; | |||||
} | } | ||||
const tabs = [ | const tabs = [ | ||||
loadingProjectCount, | loadingProjectCount, | ||||
branchesEnabled, | branchesEnabled, | ||||
multipleAlmEnabled, | multipleAlmEnabled, | ||||
projectCount, | |||||
settingsDefinitions | |||||
projectCount | |||||
} = props; | } = props; | ||||
const bindingDefinitions = { | const bindingDefinitions = { | ||||
onCheck={props.onCheckConfiguration} | onCheck={props.onCheckConfiguration} | ||||
onDelete={props.onDelete} | onDelete={props.onDelete} | ||||
onUpdateDefinitions={props.onUpdateDefinitions} | onUpdateDefinitions={props.onUpdateDefinitions} | ||||
settingsDefinitions={settingsDefinitions} | |||||
/> | /> | ||||
{definitionKeyForDeletion && ( | {definitionKeyForDeletion && ( |
AlmBindingDefinitionBase, | AlmBindingDefinitionBase, | ||||
AlmSettingsBindingStatus | AlmSettingsBindingStatus | ||||
} from '../../../../types/alm-settings'; | } from '../../../../types/alm-settings'; | ||||
import { ExtendedSettingDefinition } from '../../../../types/settings'; | |||||
import { Dict } from '../../../../types/types'; | import { Dict } from '../../../../types/types'; | ||||
import { AlmTabs } from './AlmIntegration'; | import { AlmTabs } from './AlmIntegration'; | ||||
import AlmTabRenderer from './AlmTabRenderer'; | import AlmTabRenderer from './AlmTabRenderer'; | ||||
onCheck: (definitionKey: string) => void; | onCheck: (definitionKey: string) => void; | ||||
onDelete: (definitionKey: string) => void; | onDelete: (definitionKey: string) => void; | ||||
onUpdateDefinitions: () => void; | onUpdateDefinitions: () => void; | ||||
settingsDefinitions: ExtendedSettingDefinition[]; | |||||
} | } | ||||
interface State { | interface State { | ||||
definitionStatus, | definitionStatus, | ||||
loadingAlmDefinitions, | loadingAlmDefinitions, | ||||
loadingProjectCount, | loadingProjectCount, | ||||
multipleAlmEnabled, | |||||
settingsDefinitions | |||||
multipleAlmEnabled | |||||
} = this.props; | } = this.props; | ||||
const { editDefinition, editedDefinition } = this.state; | const { editDefinition, editedDefinition } = this.state; | ||||
onEdit={this.handleEdit} | onEdit={this.handleEdit} | ||||
onCancel={this.handleCancel} | onCancel={this.handleCancel} | ||||
afterSubmit={this.handleAfterSubmit} | afterSubmit={this.handleAfterSubmit} | ||||
settingsDefinitions={settingsDefinitions} | |||||
/> | /> | ||||
); | ); | ||||
} | } |
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
*/ | */ | ||||
import * as React from 'react'; | import * as React from 'react'; | ||||
import { FormattedMessage } from 'react-intl'; | |||||
import { Link } from 'react-router-dom'; | |||||
import { Button } from '../../../../components/controls/buttons'; | import { Button } from '../../../../components/controls/buttons'; | ||||
import { Alert } from '../../../../components/ui/Alert'; | |||||
import DeferredSpinner from '../../../../components/ui/DeferredSpinner'; | import DeferredSpinner from '../../../../components/ui/DeferredSpinner'; | ||||
import { translate } from '../../../../helpers/l10n'; | import { translate } from '../../../../helpers/l10n'; | ||||
import { | import { | ||||
AlmSettingsBindingStatus, | AlmSettingsBindingStatus, | ||||
isBitbucketCloudBindingDefinition | isBitbucketCloudBindingDefinition | ||||
} from '../../../../types/alm-settings'; | } from '../../../../types/alm-settings'; | ||||
import { ExtendedSettingDefinition } from '../../../../types/settings'; | |||||
import { Dict } from '../../../../types/types'; | import { Dict } from '../../../../types/types'; | ||||
import { ALM_INTEGRATION_CATEGORY } from '../../constants'; | |||||
import CategoryDefinitionsList from '../CategoryDefinitionsList'; | |||||
import AlmBindingDefinitionBox from './AlmBindingDefinitionBox'; | import AlmBindingDefinitionBox from './AlmBindingDefinitionBox'; | ||||
import AlmBindingDefinitionForm from './AlmBindingDefinitionForm'; | import AlmBindingDefinitionForm from './AlmBindingDefinitionForm'; | ||||
import { AlmTabs } from './AlmIntegration'; | import { AlmTabs } from './AlmIntegration'; | ||||
onDelete: (definitionKey: string) => void; | onDelete: (definitionKey: string) => void; | ||||
onEdit: (definitionKey: string) => void; | onEdit: (definitionKey: string) => void; | ||||
afterSubmit: (config: AlmBindingDefinitionBase) => void; | afterSubmit: (config: AlmBindingDefinitionBase) => void; | ||||
settingsDefinitions: ExtendedSettingDefinition[]; | |||||
} | } | ||||
const AUTHENTICATION_AVAILABLE_PLATFORMS = [ | |||||
AlmKeys.GitHub, | |||||
AlmKeys.GitLab, | |||||
AlmKeys.BitbucketServer | |||||
]; | |||||
export default function AlmTabRenderer(props: AlmTabRendererProps) { | export default function AlmTabRenderer(props: AlmTabRendererProps) { | ||||
const { | const { | ||||
almTab, | almTab, | ||||
editedDefinition, | editedDefinition, | ||||
loadingAlmDefinitions, | loadingAlmDefinitions, | ||||
loadingProjectCount, | loadingProjectCount, | ||||
multipleAlmEnabled, | |||||
settingsDefinitions | |||||
multipleAlmEnabled | |||||
} = props; | } = props; | ||||
const preventCreation = loadingProjectCount || (!multipleAlmEnabled && definitions.length > 0); | const preventCreation = loadingProjectCount || (!multipleAlmEnabled && definitions.length > 0); | ||||
)} | )} | ||||
</DeferredSpinner> | </DeferredSpinner> | ||||
</div> | </div> | ||||
<div className="huge-spacer-top huge-spacer-bottom bordered-top" /> | |||||
<div className="big-padded"> | |||||
<CategoryDefinitionsList | |||||
category={ALM_INTEGRATION_CATEGORY} | |||||
definitions={settingsDefinitions} | |||||
subCategory={almTab} | |||||
/> | |||||
</div> | |||||
{AUTHENTICATION_AVAILABLE_PLATFORMS.includes(almTab) && ( | |||||
<Alert variant="info" className="spacer"> | |||||
<FormattedMessage | |||||
id="settings.almintegration.tabs.authentication-moved" | |||||
defaultMessage={translate('settings.almintegration.tabs.authentication_moved')} | |||||
values={{ | |||||
link: ( | |||||
<Link | |||||
to={{ | |||||
pathname: '/admin/settings?category=authentication' | |||||
}}> | |||||
{translate('property.category.authentication')} | |||||
</Link> | |||||
) | |||||
}} | |||||
/> | |||||
</Alert> | |||||
)} | |||||
</div> | </div> | ||||
); | ); | ||||
} | } |
return shallow<AlmIntegration>( | return shallow<AlmIntegration>( | ||||
<AlmIntegration | <AlmIntegration | ||||
appState={mockAppState({ branchesEnabled: true })} | appState={mockAppState({ branchesEnabled: true })} | ||||
definitions={[]} | |||||
location={mockLocation()} | location={mockLocation()} | ||||
router={mockRouter()} | router={mockRouter()} | ||||
{...props} | {...props} |
onDelete={jest.fn()} | onDelete={jest.fn()} | ||||
onSelectAlmTab={jest.fn()} | onSelectAlmTab={jest.fn()} | ||||
onUpdateDefinitions={jest.fn()} | onUpdateDefinitions={jest.fn()} | ||||
settingsDefinitions={[]} | |||||
{...props} | {...props} | ||||
/> | /> | ||||
); | ); |
onCheck={jest.fn()} | onCheck={jest.fn()} | ||||
onDelete={jest.fn()} | onDelete={jest.fn()} | ||||
onUpdateDefinitions={jest.fn()} | onUpdateDefinitions={jest.fn()} | ||||
settingsDefinitions={[]} | |||||
{...props} | {...props} | ||||
/> | /> | ||||
); | ); |
onDelete={jest.fn()} | onDelete={jest.fn()} | ||||
onEdit={jest.fn()} | onEdit={jest.fn()} | ||||
afterSubmit={jest.fn()} | afterSubmit={jest.fn()} | ||||
settingsDefinitions={[]} | |||||
{...props} | {...props} | ||||
/> | /> | ||||
); | ); |
onDelete={[Function]} | onDelete={[Function]} | ||||
onSelectAlmTab={[Function]} | onSelectAlmTab={[Function]} | ||||
onUpdateDefinitions={[Function]} | onUpdateDefinitions={[Function]} | ||||
settingsDefinitions={Array []} | |||||
/> | /> | ||||
`; | `; |
onCheck={[MockFunction]} | onCheck={[MockFunction]} | ||||
onDelete={[MockFunction]} | onDelete={[MockFunction]} | ||||
onUpdateDefinitions={[MockFunction]} | onUpdateDefinitions={[MockFunction]} | ||||
settingsDefinitions={Array []} | |||||
/> | /> | ||||
</Fragment> | </Fragment> | ||||
`; | `; | ||||
onCheck={[MockFunction]} | onCheck={[MockFunction]} | ||||
onDelete={[MockFunction]} | onDelete={[MockFunction]} | ||||
onUpdateDefinitions={[MockFunction]} | onUpdateDefinitions={[MockFunction]} | ||||
settingsDefinitions={Array []} | |||||
/> | /> | ||||
</Fragment> | </Fragment> | ||||
`; | `; | ||||
onCheck={[MockFunction]} | onCheck={[MockFunction]} | ||||
onDelete={[MockFunction]} | onDelete={[MockFunction]} | ||||
onUpdateDefinitions={[MockFunction]} | onUpdateDefinitions={[MockFunction]} | ||||
settingsDefinitions={Array []} | |||||
/> | /> | ||||
</Fragment> | </Fragment> | ||||
`; | `; | ||||
onCheck={[MockFunction]} | onCheck={[MockFunction]} | ||||
onDelete={[MockFunction]} | onDelete={[MockFunction]} | ||||
onUpdateDefinitions={[MockFunction]} | onUpdateDefinitions={[MockFunction]} | ||||
settingsDefinitions={Array []} | |||||
/> | /> | ||||
<DeleteModal | <DeleteModal | ||||
id="keyToDelete" | id="keyToDelete" | ||||
onCheck={[MockFunction]} | onCheck={[MockFunction]} | ||||
onDelete={[MockFunction]} | onDelete={[MockFunction]} | ||||
onUpdateDefinitions={[MockFunction]} | onUpdateDefinitions={[MockFunction]} | ||||
settingsDefinitions={Array []} | |||||
/> | /> | ||||
</Fragment> | </Fragment> | ||||
`; | `; | ||||
onCheck={[MockFunction]} | onCheck={[MockFunction]} | ||||
onDelete={[MockFunction]} | onDelete={[MockFunction]} | ||||
onUpdateDefinitions={[MockFunction]} | onUpdateDefinitions={[MockFunction]} | ||||
settingsDefinitions={Array []} | |||||
/> | /> | ||||
</Fragment> | </Fragment> | ||||
`; | `; |
onCreate={[Function]} | onCreate={[Function]} | ||||
onDelete={[MockFunction]} | onDelete={[MockFunction]} | ||||
onEdit={[Function]} | onEdit={[Function]} | ||||
settingsDefinitions={Array []} | |||||
/> | /> | ||||
`; | `; |
/> | /> | ||||
</DeferredSpinner> | </DeferredSpinner> | ||||
</div> | </div> | ||||
<div | |||||
className="huge-spacer-top huge-spacer-bottom bordered-top" | |||||
/> | |||||
<div | |||||
className="big-padded" | |||||
> | |||||
<CategoryDefinitionsList | |||||
category="almintegration" | |||||
definitions={Array []} | |||||
subCategory="azure" | |||||
/> | |||||
</div> | |||||
</div> | </div> | ||||
`; | `; | ||||
/> | /> | ||||
</DeferredSpinner> | </DeferredSpinner> | ||||
</div> | </div> | ||||
<div | |||||
className="huge-spacer-top huge-spacer-bottom bordered-top" | |||||
/> | |||||
<div | |||||
className="big-padded" | |||||
> | |||||
<CategoryDefinitionsList | |||||
category="almintegration" | |||||
definitions={Array []} | |||||
subCategory="azure" | |||||
/> | |||||
</div> | |||||
</div> | </div> | ||||
`; | `; | ||||
/> | /> | ||||
</DeferredSpinner> | </DeferredSpinner> | ||||
</div> | </div> | ||||
<div | |||||
className="huge-spacer-top huge-spacer-bottom bordered-top" | |||||
/> | |||||
<div | |||||
className="big-padded" | |||||
> | |||||
<CategoryDefinitionsList | |||||
category="almintegration" | |||||
definitions={Array []} | |||||
subCategory="azure" | |||||
/> | |||||
</div> | |||||
</div> | </div> | ||||
`; | `; | ||||
/> | /> | ||||
</DeferredSpinner> | </DeferredSpinner> | ||||
</div> | </div> | ||||
<div | |||||
className="huge-spacer-top huge-spacer-bottom bordered-top" | |||||
/> | |||||
<div | |||||
className="big-padded" | |||||
> | |||||
<CategoryDefinitionsList | |||||
category="almintegration" | |||||
definitions={Array []} | |||||
subCategory="azure" | |||||
/> | |||||
</div> | |||||
</div> | </div> | ||||
`; | `; | ||||
/> | /> | ||||
</DeferredSpinner> | </DeferredSpinner> | ||||
</div> | </div> | ||||
<div | |||||
className="huge-spacer-top huge-spacer-bottom bordered-top" | |||||
/> | |||||
<div | |||||
className="big-padded" | |||||
> | |||||
<CategoryDefinitionsList | |||||
category="almintegration" | |||||
definitions={Array []} | |||||
subCategory="azure" | |||||
/> | |||||
</div> | |||||
</div> | </div> | ||||
`; | `; | ||||
/> | /> | ||||
</DeferredSpinner> | </DeferredSpinner> | ||||
</div> | </div> | ||||
<div | |||||
className="huge-spacer-top huge-spacer-bottom bordered-top" | |||||
/> | |||||
<div | |||||
className="big-padded" | |||||
> | |||||
<CategoryDefinitionsList | |||||
category="almintegration" | |||||
definitions={Array []} | |||||
subCategory="azure" | |||||
/> | |||||
</div> | |||||
</div> | </div> | ||||
`; | `; | ||||
/> | /> | ||||
</DeferredSpinner> | </DeferredSpinner> | ||||
</div> | </div> | ||||
<div | |||||
className="huge-spacer-top huge-spacer-bottom bordered-top" | |||||
/> | |||||
<div | |||||
className="big-padded" | |||||
> | |||||
<CategoryDefinitionsList | |||||
category="almintegration" | |||||
definitions={Array []} | |||||
subCategory="azure" | |||||
/> | |||||
</div> | |||||
</div> | </div> | ||||
`; | `; | ||||
</div> | </div> | ||||
</DeferredSpinner> | </DeferredSpinner> | ||||
</div> | </div> | ||||
<div | |||||
className="huge-spacer-top huge-spacer-bottom bordered-top" | |||||
/> | |||||
<div | |||||
className="big-padded" | |||||
> | |||||
<CategoryDefinitionsList | |||||
category="almintegration" | |||||
definitions={Array []} | |||||
subCategory="azure" | |||||
/> | |||||
</div> | |||||
</div> | </div> | ||||
`; | `; | ||||
/> | /> | ||||
</DeferredSpinner> | </DeferredSpinner> | ||||
</div> | </div> | ||||
<div | |||||
className="huge-spacer-top huge-spacer-bottom bordered-top" | |||||
/> | |||||
<div | |||||
className="big-padded" | |||||
> | |||||
<CategoryDefinitionsList | |||||
category="almintegration" | |||||
definitions={Array []} | |||||
subCategory="azure" | |||||
/> | |||||
</div> | |||||
</div> | </div> | ||||
`; | `; | ||||
/> | /> | ||||
</DeferredSpinner> | </DeferredSpinner> | ||||
</div> | </div> | ||||
<div | |||||
className="huge-spacer-top huge-spacer-bottom bordered-top" | |||||
/> | |||||
<div | |||||
className="big-padded" | |||||
> | |||||
<CategoryDefinitionsList | |||||
category="almintegration" | |||||
definitions={Array []} | |||||
subCategory="azure" | |||||
/> | |||||
</div> | |||||
</div> | </div> | ||||
`; | `; | ||||
</div> | </div> | ||||
</DeferredSpinner> | </DeferredSpinner> | ||||
</div> | </div> | ||||
<div | |||||
className="huge-spacer-top huge-spacer-bottom bordered-top" | |||||
/> | |||||
<div | |||||
className="big-padded" | |||||
> | |||||
<CategoryDefinitionsList | |||||
category="almintegration" | |||||
definitions={Array []} | |||||
subCategory="azure" | |||||
/> | |||||
</div> | |||||
</div> | </div> | ||||
`; | `; | ||||
/> | /> | ||||
</DeferredSpinner> | </DeferredSpinner> | ||||
</div> | </div> | ||||
<div | |||||
className="huge-spacer-top huge-spacer-bottom bordered-top" | |||||
/> | |||||
<div | |||||
className="big-padded" | |||||
<Alert | |||||
className="spacer" | |||||
variant="info" | |||||
> | > | ||||
<CategoryDefinitionsList | |||||
category="almintegration" | |||||
definitions={Array []} | |||||
subCategory="bitbucket" | |||||
<FormattedMessage | |||||
defaultMessage="settings.almintegration.tabs.authentication_moved" | |||||
id="settings.almintegration.tabs.authentication-moved" | |||||
values={ | |||||
Object { | |||||
"link": <Link | |||||
to={ | |||||
Object { | |||||
"pathname": "/admin/settings?category=authentication", | |||||
} | |||||
} | |||||
> | |||||
property.category.authentication | |||||
</Link>, | |||||
} | |||||
} | |||||
/> | /> | ||||
</div> | |||||
</Alert> | |||||
</div> | </div> | ||||
`; | `; |
settings.almintegration.feature.alm_repo_import.disabled=Disabled | settings.almintegration.feature.alm_repo_import.disabled=Disabled | ||||
settings.almintegration.feature.alm_repo_import.disabled.multiple=This feature is disabled because you have 2 or more integration instances configured. | settings.almintegration.feature.alm_repo_import.disabled.multiple=This feature is disabled because you have 2 or more integration instances configured. | ||||
settings.almintegration.feature.alm_repo_import.disabled.no_url=This feature is disabled because your configured instance has no URL. | settings.almintegration.feature.alm_repo_import.disabled.no_url=This feature is disabled because your configured instance has no URL. | ||||
settings.almintegration.tabs.authentication_moved=You can delegate authentication to this DevOps Platform. The relevant settings are under the {link} section. | |||||
settings.pr_decoration.binding.category=DevOps Platform Integration | settings.pr_decoration.binding.category=DevOps Platform Integration | ||||
settings.pr_decoration.binding.no_bindings=A system administrator needs to enable this feature in the global settings. | settings.pr_decoration.binding.no_bindings=A system administrator needs to enable this feature in the global settings. | ||||
property.category.general.qualityGate=Quality Gate | property.category.general.qualityGate=Quality Gate | ||||
property.category.general.subProjects=Sub-projects | property.category.general.subProjects=Sub-projects | ||||
property.category.almintegration=DevOps Platform Integrations | property.category.almintegration=DevOps Platform Integrations | ||||
property.category.almintegration.github=GitHub Authentication | |||||
property.category.almintegration.github.description=In order to enable authentication on GitHub.com or GitHub Enterprise:<ul><li>SonarQube must be publicly accessible through HTTPS only</li><li>The property 'sonar.core.serverBaseURL' must be set to this public HTTPS URL</li><li>In your GitHub profile, you need to create a Developer Application for which the 'Authorization callback URL' must be set to <code>'<value_of_sonar.core.serverBaseURL_property>/oauth2/callback'</code>.</li></ul> | |||||
property.category.almintegration.gitlab=GitLab Authentication | |||||
property.category.almintegration.gitlab.description=In order to enable GitLab authentication, the property 'sonar.core.serverBaseURL' must be set to the public URL | |||||
property.category.almintegration.bitbucket=Bitbucket Cloud Authentication | |||||
property.category.almintegration.bitbucket.description=In order to enable authentication on Bitbucket.org: <ul><li>SonarQube must be publicly accessible through HTTPS only</li><li>The property 'sonar.core.serverBaseURL' must be set to this public HTTPS URL</li><li>In your Bitbucket OAuth Consumer settings, 'Callback URL' must be set to <code>'<value_of_sonar.core.serverBaseURL_property>'</code>.</li></ul> | |||||
property.category.authentication=Authentication | |||||
property.category.authentication.github=GitHub Authentication | |||||
property.category.authentication.github.description=In order to enable authentication on GitHub.com or GitHub Enterprise:<ul><li>SonarQube must be publicly accessible through HTTPS only</li><li>The property 'sonar.core.serverBaseURL' must be set to this public HTTPS URL</li><li>In your GitHub profile, you need to create a Developer Application for which the 'Authorization callback URL' must be set to <code>'<value_of_sonar.core.serverBaseURL_property>/oauth2/callback'</code>.</li></ul> | |||||
property.category.authentication.gitlab=GitLab Authentication | |||||
property.category.authentication.gitlab.description=In order to enable GitLab authentication, the property 'sonar.core.serverBaseURL' must be set to the public URL | |||||
property.category.authentication.bitbucket=Bitbucket Cloud Authentication | |||||
property.category.authentication.bitbucket.description=In order to enable authentication on Bitbucket.org: <ul><li>SonarQube must be publicly accessible through HTTPS only</li><li>The property 'sonar.core.serverBaseURL' must be set to this public HTTPS URL</li><li>In your Bitbucket OAuth Consumer settings, 'Callback URL' must be set to <code>'<value_of_sonar.core.serverBaseURL_property>'</code>.</li></ul> | |||||
property.category.authentication.saml=SAML | |||||
property.category.authentication.saml.description=In order to enable SAML authentication, the property 'sonar.core.serverBaseURL' must be set to the public URL | |||||
property.category.organizations=Organizations | property.category.organizations=Organizations | ||||
property.category.security=Security | property.category.security=Security | ||||
property.category.security.encryption=Encryption | property.category.security.encryption=Encryption | ||||
property.category.security.saml=SAML | |||||
property.category.security.saml.description=In order to enable SAML authentication, the property 'sonar.core.serverBaseURL' must be set to the public URL | |||||
property.category.java=Java | property.category.java=Java | ||||
property.category.differentialViews=New Code | property.category.differentialViews=New Code | ||||
property.category.codeCoverage=Code Coverage | property.category.codeCoverage=Code Coverage |