From cdeb0429be4e9e4c1590e2333bd780e5fa9d1a65 Mon Sep 17 00:00:00 2001 From: Viktor Vorona Date: Wed, 24 Apr 2024 14:52:52 +0200 Subject: SONAR-22049 Align getComponentIssuesUrl and getComponentSecurityHotspotsUrl --- .../main/js/components/SourceViewer/SourceViewer.tsx | 2 +- .../js/components/SourceViewer/SourceViewerHeader.tsx | 18 ++++++++---------- .../js/components/SourceViewer/helpers/loadIssues.ts | 2 +- 3 files changed, 10 insertions(+), 12 deletions(-) (limited to 'server/sonar-web/src/main/js/components/SourceViewer') diff --git a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewer.tsx b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewer.tsx index 07ba7e6bfb0..49c1aaac719 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewer.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewer.tsx @@ -21,6 +21,7 @@ import { FlagMessage } from 'design-system'; import { intersection } from 'lodash'; import * as React from 'react'; +import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; import { getComponentData, getComponentForSourceViewer, @@ -31,7 +32,6 @@ import { ComponentContext } from '../../app/components/componentContext/Componen import { isSameBranchLike } from '../../helpers/branch-like'; import { translate } from '../../helpers/l10n'; import { HttpStatus } from '../../helpers/request'; -import { getBranchLikeQuery } from '../../sonar-aligned/helpers/branch-like'; import { BranchLike } from '../../types/branch-like'; import { ComponentQualifier } from '../../types/component'; import { diff --git a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeader.tsx b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeader.tsx index c2372d53b3c..694b4442a7b 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeader.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeader.tsx @@ -38,6 +38,12 @@ import { } from 'design-system'; import * as React from 'react'; import { useIntl } from 'react-intl'; +import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; +import { formatMeasure } from '~sonar-aligned/helpers/measures'; +import { + getComponentIssuesUrl, + getComponentSecurityHotspotsUrl, +} from '~sonar-aligned/helpers/urls'; import { SOFTWARE_QUALITIES } from '../../helpers/constants'; import { ISSUETYPE_METRIC_KEYS_MAP, @@ -49,14 +55,7 @@ import { collapsedDirFromPath, fileFromPath } from '../../helpers/path'; import { omitNil } from '../../helpers/request'; import { getBaseUrl } from '../../helpers/system'; import { isDefined } from '../../helpers/types'; -import { - getBranchLikeUrl, - getCodeUrl, - getComponentIssuesUrl, - getComponentSecurityHotspotsUrl, -} from '../../helpers/urls'; -import { getBranchLikeQuery } from '../../sonar-aligned/helpers/branch-like'; -import { formatMeasure } from '../../sonar-aligned/helpers/measures'; +import { getBranchLikeUrl, getCodeUrl } from '../../helpers/urls'; import type { BranchLike } from '../../types/branch-like'; import { ComponentQualifier } from '../../types/component'; import { IssueType } from '../../types/issues'; @@ -148,8 +147,7 @@ export default function SourceViewerHeader(props: Readonly) {