From cf3c5203c08b21b12108b917a1725a7829d63109 Mon Sep 17 00:00:00 2001 From: stanislavh Date: Tue, 23 Apr 2024 14:12:32 +0200 Subject: SONAR-22049 Align RatingLabel type --- .../sonar-web/src/main/js/apps/code/components/ComponentMeasure.tsx | 4 ++-- .../src/main/js/apps/component-measures/components/MeasureHeader.tsx | 4 ++-- .../src/main/js/apps/component-measures/drilldown/MeasureCell.tsx | 4 ++-- .../js/apps/component-measures/sidebar/SubnavigationMeasureValue.tsx | 4 ++-- .../js/apps/projects/components/project-card/ProjectCardMeasures.tsx | 4 ++-- server/sonar-web/src/main/js/apps/projects/filters/RatingFacet.tsx | 4 ++-- .../src/main/js/apps/projects/filters/SecurityReviewFilter.tsx | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) (limited to 'server/sonar-web/src/main/js/apps') diff --git a/server/sonar-web/src/main/js/apps/code/components/ComponentMeasure.tsx b/server/sonar-web/src/main/js/apps/code/components/ComponentMeasure.tsx index d3b36317eb3..b4b21a0fab7 100644 --- a/server/sonar-web/src/main/js/apps/code/components/ComponentMeasure.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/ComponentMeasure.tsx @@ -19,11 +19,11 @@ */ import { ContentCell, - MetricsEnum, MetricsRatingBadge, NumericalCell, QualityGateIndicator, RatingCell, + RatingEnum, } from 'design-system'; import * as React from 'react'; import Measure from '../../../components/measure/Measure'; @@ -96,7 +96,7 @@ export default function ComponentMeasure(props: Props) { ); diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/MeasureHeader.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/MeasureHeader.tsx index a6790e2af7a..4fd76d7d88b 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/components/MeasureHeader.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/components/MeasureHeader.tsx @@ -19,7 +19,7 @@ */ import { LinkStandalone } from '@sonarsource/echoes-react'; import classNames from 'classnames'; -import { MetricsLabel, MetricsRatingBadge } from 'design-system'; +import { MetricsRatingBadge, RatingLabel } from 'design-system'; import * as React from 'react'; import LanguageDistribution from '../../../components/charts/LanguageDistribution'; import Tooltip from '../../../components/controls/Tooltip'; @@ -78,7 +78,7 @@ export default function MeasureHeader(props: Readonly) { ) : translate('metric.no_rating') } - rating={formatMeasure(measureValue, MetricType.Rating) as MetricsLabel} + rating={formatMeasure(measureValue, MetricType.Rating) as RatingLabel} /> } /> diff --git a/server/sonar-web/src/main/js/apps/component-measures/drilldown/MeasureCell.tsx b/server/sonar-web/src/main/js/apps/component-measures/drilldown/MeasureCell.tsx index 56a1ac29744..e4354dbf8c9 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/drilldown/MeasureCell.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/drilldown/MeasureCell.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { MetricsLabel, MetricsRatingBadge, NumericalCell } from 'design-system'; +import { MetricsRatingBadge, NumericalCell, RatingLabel } from 'design-system'; import * as React from 'react'; import Measure from '../../../components/measure/Measure'; import { translate, translateWithParameters } from '../../../helpers/l10n'; @@ -55,7 +55,7 @@ export default function MeasureCell({ component, measure, metric }: Props) { ) : translate('metric.no_rating') } - rating={formatMeasure(value, MetricType.Rating) as MetricsLabel} + rating={formatMeasure(value, MetricType.Rating) as RatingLabel} /> } /> diff --git a/server/sonar-web/src/main/js/apps/component-measures/sidebar/SubnavigationMeasureValue.tsx b/server/sonar-web/src/main/js/apps/component-measures/sidebar/SubnavigationMeasureValue.tsx index 7088bd7e639..ab344f0ff6b 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/sidebar/SubnavigationMeasureValue.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/sidebar/SubnavigationMeasureValue.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { MetricsLabel, MetricsRatingBadge, Note } from 'design-system'; +import { MetricsRatingBadge, Note, RatingLabel } from 'design-system'; import React from 'react'; import Measure from '../../../components/measure/Measure'; import { translate, translateWithParameters } from '../../../helpers/l10n'; @@ -48,7 +48,7 @@ export default function SubnavigationMeasureValue({ measure }: Readonly) ? translateWithParameters('metric.has_rating_X', formatted) : translate('metric.no_rating') } - rating={formatted as MetricsLabel} + rating={formatted as RatingLabel} /> } metricKey={measure.metric.key} diff --git a/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardMeasures.tsx b/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardMeasures.tsx index 2f9afad7e32..352418538c0 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardMeasures.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardMeasures.tsx @@ -20,10 +20,10 @@ import { CoverageIndicator, DuplicationsIndicator, - MetricsLabel, MetricsRatingBadge, Note, PageContentFontWrapper, + RatingLabel, } from 'design-system'; import * as React from 'react'; import Measure from '../../../../components/measure/Measure'; @@ -178,7 +178,7 @@ function renderRatings(props: ProjectCardMeasuresProps) { return ( - + + ); } diff --git a/server/sonar-web/src/main/js/apps/projects/filters/SecurityReviewFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/SecurityReviewFilter.tsx index 1a99368fcee..9764cea8aa6 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/SecurityReviewFilter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/SecurityReviewFilter.tsx @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { MetricsEnum, MetricsRatingBadge } from 'design-system'; +import { MetricsRatingBadge, RatingEnum } from 'design-system'; import * as React from 'react'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { formatMeasure } from '../../../helpers/measures'; @@ -84,7 +84,7 @@ function renderOption(option: number) {
{labels[option]} -- cgit v1.2.3