aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx')
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx22
1 files changed, 22 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx
index b66f0808576..259d754d95e 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx
@@ -23,6 +23,7 @@ import {
HeadingDark,
HelperHintIcon,
HighlightedSection,
+ LightLabel,
LightPrimary,
Link,
Note,
@@ -34,6 +35,7 @@ import * as React from 'react';
import { FormattedMessage } from 'react-intl';
import { useAvailableFeatures } from '../../../app/components/available-features/withAvailableFeatures';
import { useMetrics } from '../../../app/components/metrics/withMetricsContext';
+import DocumentationLink from '../../../components/common/DocumentationLink';
import DocumentationTooltip from '../../../components/common/DocumentationTooltip';
import ModalButton, { ModalProps } from '../../../components/controls/ModalButton';
import { useDocUrl } from '../../../helpers/docs';
@@ -49,6 +51,7 @@ import CaycCondition from './CaycCondition';
import CaycFixOptimizeBanner from './CaycFixOptimizeBanner';
import CaycReviewUpdateConditionsModal from './ConditionReviewAndUpdateModal';
import ConditionsTable from './ConditionsTable';
+import QGRecommendedIcon from './QGRecommendedIcon';
interface Props {
qualityGate: QualityGate;
@@ -145,6 +148,25 @@ export default function Conditions({ qualityGate, isFetching }: Readonly<Props>)
<div>
<CaYCConditionsSimplificationGuide qualityGate={qualityGate} />
+ {qualityGate.isBuiltIn && (
+ <div className="sw-flex sw-items-center sw-mt-2 sw-mb-9">
+ <QGRecommendedIcon className="sw-mr-1" />
+ <LightLabel>
+ <FormattedMessage
+ defaultMessage="quality_gates.is_built_in.cayc.description"
+ id="quality_gates.is_built_in.cayc.description"
+ values={{
+ link: (
+ <DocumentationLink to="/user-guide/clean-as-you-code/">
+ {translate('clean_as_you_code')}
+ </DocumentationLink>
+ ),
+ }}
+ />
+ </LightLabel>
+ </div>
+ )}
+
{isCompliantCustomQualityGate && !isOptimizing && <CaycCompliantBanner />}
{isCompliantCustomQualityGate && isOptimizing && canEdit && (
<CaycFixOptimizeBanner renderCaycModal={renderCaycModal} isOptimizing />