aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/projects
diff options
context:
space:
mode:
authorViktor Vorona <viktor.vorona@sonarsource.com>2024-04-25 16:15:10 +0200
committerMatteo Mara <matteo.mara@sonarsource.com>2024-04-30 10:59:04 +0200
commit3ed9a8fb882a5f69cfac321007139916f687cdf0 (patch)
tree997be95eb2e66af8a29223bf7daa3e7c06ad4a05 /server/sonar-web/src/main/js/apps/projects
parentdade4edf434e12c90e9c39b114047540b5d352b6 (diff)
downloadsonarqube-3ed9a8fb882a5f69cfac321007139916f687cdf0.tar.gz
sonarqube-3ed9a8fb882a5f69cfac321007139916f687cdf0.zip
SONAR-22049 Align MetricKey, MetricType
Diffstat (limited to 'server/sonar-web/src/main/js/apps/projects')
-rw-r--r--server/sonar-web/src/main/js/apps/projects/components/AllProjects.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/projects/components/__tests__/AllProjects-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCard.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardMeasures.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/ProjectCard-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/ProjectCardMeasures-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/projects/filters/CoverageFilter.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/projects/filters/NewCoverageFilter.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/projects/filters/NewLinesFilter.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/projects/filters/RatingFacet.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/projects/filters/SecurityReviewFilter.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/projects/utils.ts2
12 files changed, 12 insertions, 12 deletions
diff --git a/server/sonar-web/src/main/js/apps/projects/components/AllProjects.tsx b/server/sonar-web/src/main/js/apps/projects/components/AllProjects.tsx
index 4858fda67d6..6b920b73e11 100644
--- a/server/sonar-web/src/main/js/apps/projects/components/AllProjects.tsx
+++ b/server/sonar-web/src/main/js/apps/projects/components/AllProjects.tsx
@@ -33,6 +33,7 @@ import { Helmet } from 'react-helmet-async';
import { useSearchParams } from 'react-router-dom';
import { withRouter } from '~sonar-aligned/components/hoc/withRouter';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { Location, RawQuery, Router } from '~sonar-aligned/types/router';
import { searchProjects } from '../../../api/components';
import withAppStateContext from '../../../app/components/app-state/withAppStateContext';
@@ -46,7 +47,6 @@ import { translate } from '../../../helpers/l10n';
import { get, save } from '../../../helpers/storage';
import { isDefined } from '../../../helpers/types';
import { AppState } from '../../../types/appstate';
-import { MetricKey } from '../../../types/metrics';
import { CurrentUser, isLoggedIn } from '../../../types/users';
import { Query, hasFilterParams, parseUrlQuery } from '../query';
import '../styles.css';
diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/AllProjects-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/AllProjects-test.tsx
index 764553be846..a9c64c430b2 100644
--- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/AllProjects-test.tsx
+++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/AllProjects-test.tsx
@@ -22,12 +22,12 @@ import userEvent from '@testing-library/user-event';
import * as React from 'react';
import { AutoSizerProps } from 'react-virtualized';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { ProjectsServiceMock } from '../../../../api/mocks/ProjectsServiceMock';
import { save } from '../../../../helpers/storage';
import { mockAppState, mockLoggedInUser } from '../../../../helpers/testMocks';
import { renderAppRoutes } from '../../../../helpers/testReactTestingUtils';
import { byLabelText, byRole, byText } from '../../../../helpers/testSelector';
-import { MetricKey } from '../../../../types/metrics';
import { Dict } from '../../../../types/types';
import projectRoutes from '../../routes';
import { LS_PROJECTS_SORT, LS_PROJECTS_VIEW } from '../AllProjects';
diff --git a/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCard.tsx b/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCard.tsx
index b2e6a415f25..5039b6ad228 100644
--- a/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCard.tsx
+++ b/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCard.tsx
@@ -39,6 +39,7 @@ import * as React from 'react';
import { FormattedMessage } from 'react-intl';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import Favorite from '../../../../components/controls/Favorite';
import Tooltip from '../../../../components/controls/Tooltip';
import DateFromNow from '../../../../components/intl/DateFromNow';
@@ -47,7 +48,6 @@ import Measure from '../../../../components/measure/Measure';
import { translate, translateWithParameters } from '../../../../helpers/l10n';
import { isDefined } from '../../../../helpers/types';
import { getProjectUrl } from '../../../../helpers/urls';
-import { MetricKey, MetricType } from '../../../../types/metrics';
import { Status } from '../../../../types/types';
import { CurrentUser, isLoggedIn } from '../../../../types/users';
import { Project } from '../../types';
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 420e38cd77b..c8f9896b5c3 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
@@ -27,12 +27,12 @@ import {
} from 'design-system';
import * as React from 'react';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import Measure from '../../../../components/measure/Measure';
import { duplicationRatingConverter } from '../../../../components/measure/utils';
import { translate } from '../../../../helpers/l10n';
import { formatRating } from '../../../../helpers/measures';
import { isDefined } from '../../../../helpers/types';
-import { MetricKey, MetricType } from '../../../../types/metrics';
import { Dict } from '../../../../types/types';
import ProjectCardMeasure from './ProjectCardMeasure';
diff --git a/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/ProjectCard-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/ProjectCard-test.tsx
index fdcdaf6af55..1f5cfda2ca2 100644
--- a/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/ProjectCard-test.tsx
+++ b/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/ProjectCard-test.tsx
@@ -20,10 +20,10 @@
import { screen } from '@testing-library/react';
import React from 'react';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { mockCurrentUser, mockLoggedInUser } from '../../../../../helpers/testMocks';
import { renderComponent } from '../../../../../helpers/testReactTestingUtils';
import { Visibility } from '../../../../../types/component';
-import { MetricKey } from '../../../../../types/metrics';
import { CurrentUser } from '../../../../../types/users';
import { Project } from '../../../types';
import ProjectCard from '../ProjectCard';
diff --git a/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/ProjectCardMeasures-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/ProjectCardMeasures-test.tsx
index 10513b0e743..c2bc48d9936 100644
--- a/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/ProjectCardMeasures-test.tsx
+++ b/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/ProjectCardMeasures-test.tsx
@@ -21,8 +21,8 @@ import { screen } from '@testing-library/react';
import * as React from 'react';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { renderComponent } from '../../../../../helpers/testReactTestingUtils';
-import { MetricKey } from '../../../../../types/metrics';
import { Dict } from '../../../../../types/types';
import ProjectCardMeasures, { ProjectCardMeasuresProps } from '../ProjectCardMeasures';
diff --git a/server/sonar-web/src/main/js/apps/projects/filters/CoverageFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/CoverageFilter.tsx
index 73f4796e5a1..ff6a45eb73f 100644
--- a/server/sonar-web/src/main/js/apps/projects/filters/CoverageFilter.tsx
+++ b/server/sonar-web/src/main/js/apps/projects/filters/CoverageFilter.tsx
@@ -19,10 +19,10 @@
*/
import { CoverageIndicator } from 'design-system';
import * as React from 'react';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { RawQuery } from '~sonar-aligned/types/router';
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { getCoverageRatingAverageValue, getCoverageRatingLabel } from '../../../helpers/ratings';
-import { MetricKey } from '../../../types/metrics';
import { Facet } from '../types';
import RangeFacetBase from './RangeFacetBase';
diff --git a/server/sonar-web/src/main/js/apps/projects/filters/NewCoverageFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/NewCoverageFilter.tsx
index 53c75838ace..e46860a1b62 100644
--- a/server/sonar-web/src/main/js/apps/projects/filters/NewCoverageFilter.tsx
+++ b/server/sonar-web/src/main/js/apps/projects/filters/NewCoverageFilter.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { MetricKey } from '../../../types/metrics';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import CoverageFilter, { Props } from './CoverageFilter';
export default function NewCoverageFilter(props: Props) {
diff --git a/server/sonar-web/src/main/js/apps/projects/filters/NewLinesFilter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/NewLinesFilter.tsx
index 4bc25a02e0f..a3f3ae1366e 100644
--- a/server/sonar-web/src/main/js/apps/projects/filters/NewLinesFilter.tsx
+++ b/server/sonar-web/src/main/js/apps/projects/filters/NewLinesFilter.tsx
@@ -18,10 +18,10 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { RawQuery } from '~sonar-aligned/types/router';
import { translate } from '../../../helpers/l10n';
import { getSizeRatingLabel } from '../../../helpers/ratings';
-import { MetricKey } from '../../../types/metrics';
import { Facet } from '../types';
import RangeFacetBase from './RangeFacetBase';
diff --git a/server/sonar-web/src/main/js/apps/projects/filters/RatingFacet.tsx b/server/sonar-web/src/main/js/apps/projects/filters/RatingFacet.tsx
index fe816e6f24f..9b8df67e781 100644
--- a/server/sonar-web/src/main/js/apps/projects/filters/RatingFacet.tsx
+++ b/server/sonar-web/src/main/js/apps/projects/filters/RatingFacet.tsx
@@ -20,9 +20,9 @@
import { MetricsRatingBadge, RatingEnum } from 'design-system';
import * as React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricType } from '~sonar-aligned/types/metrics';
import { RawQuery } from '~sonar-aligned/types/router';
import { translate, translateWithParameters } from '../../../helpers/l10n';
-import { MetricType } from '../../../types/metrics';
import { Facet } from '../types';
import RangeFacetBase from './RangeFacetBase';
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 45350adbac8..dde1c3b2707 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
@@ -20,9 +20,9 @@
import { MetricsRatingBadge, RatingEnum } from 'design-system';
import * as React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricType } from '~sonar-aligned/types/metrics';
import { RawQuery } from '~sonar-aligned/types/router';
import { translate, translateWithParameters } from '../../../helpers/l10n';
-import { MetricType } from '../../../types/metrics';
import { Dict } from '../../../types/types';
import { Facet } from '../types';
import RangeFacetBase from './RangeFacetBase';
diff --git a/server/sonar-web/src/main/js/apps/projects/utils.ts b/server/sonar-web/src/main/js/apps/projects/utils.ts
index c31270fc0ee..a59ea6ea7b9 100644
--- a/server/sonar-web/src/main/js/apps/projects/utils.ts
+++ b/server/sonar-web/src/main/js/apps/projects/utils.ts
@@ -18,12 +18,12 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { invert } from 'lodash';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { Facet, getScannableProjects, searchProjects } from '../../api/components';
import { getMeasuresForProjects } from '../../api/measures';
import { translate, translateWithParameters } from '../../helpers/l10n';
import { isDiffMetric } from '../../helpers/measures';
import { RequestData } from '../../helpers/request';
-import { MetricKey } from '../../types/metrics';
import { Dict } from '../../types/types';
import { Query, convertToFilter } from './query';