Skip to content

Commit

Permalink
fix: adjust sonarqube cloud config
Browse files Browse the repository at this point in the history
  • Loading branch information
mintsweet committed Oct 11, 2024
1 parent 5e6e364 commit 52fe2c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ interface Props {
disabled?: boolean;
name: string;
multipleVersions?: Record<VersionType, string>;
cloudName?: string;
initialValue: string;
value: string;
error: string;
Expand All @@ -41,6 +42,7 @@ export const ConnectionEndpoint = ({
disabled = false,
name,
multipleVersions,
cloudName,
initialValue,
value,
setValue,
Expand Down Expand Up @@ -79,7 +81,7 @@ export const ConnectionEndpoint = ({
<>
<Block title={`${name} Version`} required>
<Radio.Group value={version} onChange={handleChange}>
<Radio value="cloud">{name} Cloud</Radio>
<Radio value="cloud">{cloudName ? cloudName : `${name} Cloud`}</Radio>
<Radio value="server" disabled={!multipleVersions.server}>
{name} Server {multipleVersions.server ? multipleVersions.server : '(to be supported)'}
</Radio>
Expand Down
3 changes: 2 additions & 1 deletion config-ui/src/plugins/register/sonarqube/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ export const SonarQubeConfig: IPluginConfig = {
cloud: 'https://sonarcloud.io/api/',
server: ' ',
},
subLabel: 'If you are using SonarCloud, the endpoint URL will be set to `https://sonarcloud.io/api/`.',
cloudName: 'SonarCloud',
subLabel: 'The URL should be `http://<sonarqube-host>:<port>/api/`',
},
({ type, initialValues, values, errors, setValues, setErrors }: any) => (
<Organization
Expand Down

0 comments on commit 52fe2c8

Please sign in to comment.