]> source.dussan.org Git - sonarqube.git/commitdiff
CODEFIX-75 Add a link to docs in AI CodeFix service check section
authorDamien Urruty <damien.urruty@sonarsource.com>
Tue, 29 Oct 2024 07:09:58 +0000 (08:09 +0100)
committersonartech <sonartech@sonarsource.com>
Wed, 30 Oct 2024 20:02:43 +0000 (20:02 +0000)
server/sonar-web/src/main/js/apps/settings/components/CodeFixAdmin.tsx
server/sonar-web/src/main/js/helpers/doc-links.ts
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index f13acfaf316bd44bddff4ab565b44f33204f249d..e111ed87715d807ff451f02c52c8820fb1955fcd 100644 (file)
@@ -28,7 +28,7 @@ import {
   IconError,
   LinkStandalone,
   Spinner,
-  Text
+  Text,
 } from '@sonarsource/echoes-react';
 import { MutationStatus } from '@tanstack/react-query';
 import { AxiosError } from 'axios';
@@ -37,11 +37,16 @@ import { FormattedMessage } from 'react-intl';
 import { BasicSeparator, HighlightedSection, themeColor, UnorderedList } from '~design-system';
 import { SuggestionServiceStatusCheckResponse } from '../../../api/fix-suggestions';
 import withAvailableFeatures, {
-  WithAvailableFeaturesProps
+  WithAvailableFeaturesProps,
 } from '../../../app/components/available-features/withAvailableFeatures';
+import DocumentationLink from '../../../components/common/DocumentationLink';
+import { DocLink } from '../../../helpers/doc-links';
 import { translate } from '../../../helpers/l10n';
 import { getAiCodeFixTermsOfServiceUrl } from '../../../helpers/urls';
-import { useCheckServiceMutation, useRemoveCodeSuggestionsCache } from '../../../queries/fix-suggestions';
+import {
+  useCheckServiceMutation,
+  useRemoveCodeSuggestionsCache,
+} from '../../../queries/fix-suggestions';
 import { useGetValueQuery, useSaveSimpleValueMutation } from '../../../queries/settings';
 import { Feature } from '../../../types/features';
 import { SettingsKey } from '../../../types/settings';
@@ -166,7 +171,10 @@ function CodeFixAdmin({ hasFeature }: Readonly<Props>) {
             {translate('property.codefix.admin.serviceCheck.title')}
           </Heading>
           <p>{translate('property.codefix.admin.serviceCheck.description1')}</p>
-          <p className="sw-mt-4">{translate('property.codefix.admin.serviceCheck.description2')}</p>
+          <DocumentationLink to={DocLink.AiCodeFixEnabling}>
+            {translate('property.codefix.admin.serviceCheck.learnMore')}
+          </DocumentationLink>
+          <p>{translate('property.codefix.admin.serviceCheck.description2')}</p>
           <Button
             className="sw-mt-4"
             variety={ButtonVariety.Default}
index ee5dd7e44c0a96054e6c4280f9130e92f12d9214..db7229d2f6bc3673a9f64391b51ca40215221e4d 100644 (file)
@@ -26,6 +26,7 @@ export enum DocLink {
   AccountTokens = '/user-guide/managing-tokens/',
   ActiveVersions = '/server-upgrade-and-maintenance/upgrade/upgrade-the-server/active-versions/',
   AiCodeAssurance = '/user-guide/ai-features/',
+  AiCodeFixEnabling = 'instance-administration/system-functions/enabling-ai-generated-fix-suggestions/',
   AlmAzureIntegration = '/devops-platform-integration/azure-devops-integration/',
   AlmBitBucketCloudAuth = '/instance-administration/authentication/bitbucket-cloud/',
   AlmBitBucketCloudIntegration = '/devops-platform-integration/bitbucket-integration/bitbucket-cloud-integration/',
index 050dc6e80d22524909300a8cdef1b8d04496a256..db8dcea6d67a7f5a52fd9be01bd21172f190ce19 100644 (file)
@@ -1926,6 +1926,7 @@ property.codefix.admin.promoted_section.content2=At the end of the trial, this f
 property.codefix.admin.serviceCheck.title=Test the AI CodeFix service
 property.codefix.admin.serviceCheck.description1=Make sure this SonarQube instance can communicate with the AI CodeFix service, which requires network connectivity to function.
 property.codefix.admin.serviceCheck.description2=This test is free and should only take a few seconds.
+property.codefix.admin.serviceCheck.learnMore=Read more about enabling AI CodeFix
 property.codefix.admin.serviceCheck.action=Test AI CodeFix service
 property.codefix.admin.serviceCheck.spinner.label=Waiting for AI CodeFix service to respond...
 property.codefix.admin.serviceCheck.result.success=The AI CodeFix service responded successfully.