From: Viktor Vorona Date: Mon, 14 Oct 2024 11:46:08 +0000 (+0200) Subject: SONAR-23191 Quality Profile comparison page X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=22906d8ca27b854f1f36b0ae585494c6f57639cb;p=sonarqube.git SONAR-23191 Quality Profile comparison page --- diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.tsx index d0081200487..5ace834dc30 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.tsx @@ -17,7 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ActionCell, ContentCell, Link, Table, TableRowInteractive } from 'design-system'; +import { LinkStandalone } from '@sonarsource/echoes-react'; +import { ActionCell, ContentCell, Table, TableRowInteractive } from 'design-system'; import { isEqual } from 'lodash'; import * as React from 'react'; import { useIntl } from 'react-intl'; @@ -26,6 +27,7 @@ import IssueSeverityIcon from '../../../components/icon-mappers/IssueSeverityIco import { CleanCodeAttributePill } from '../../../components/shared/CleanCodeAttributePill'; import SoftwareImpactPillList from '../../../components/shared/SoftwareImpactPillList'; import { getRulesUrl } from '../../../helpers/urls'; +import { useIsLegacyCCTMode } from '../../../queries/settings'; import { IssueSeverity } from '../../../types/issues'; import { Dict } from '../../../types/types'; import ComparisonResultActivation from './ComparisonResultActivation'; @@ -222,16 +224,21 @@ export default function ComparisonResults(props: Readonly) { } function RuleCell({ rule, severity }: Readonly<{ rule: RuleCompare; severity?: string }>) { + const { data: isLegacy } = useIsLegacyCCTMode(); const shouldRenderSeverity = - Boolean(severity) && rule.left && rule.right && isEqual(rule.left.params, rule.right.params); + isLegacy && + Boolean(severity) && + rule.left && + rule.right && + isEqual(rule.left.params, rule.right.params); return (
{shouldRenderSeverity && } - + {rule.name} - - {(rule.cleanCodeAttributeCategory || rule.impacts.length > 0) && ( + + {!isLegacy && (rule.cleanCodeAttributeCategory || rule.impacts.length > 0) && (
    {rule.cleanCodeAttributeCategory && (