diff options
Diffstat (limited to 'server/sonar-web/src/main/js/apps/security-hotspots')
6 files changed, 9 insertions, 14 deletions
diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/SecurityHotspotsApp.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/SecurityHotspotsApp.tsx index c2c23eac0af..c0ab9f2e220 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/SecurityHotspotsApp.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/SecurityHotspotsApp.tsx @@ -20,6 +20,7 @@ import { flatMap, range } from 'lodash'; import * as React from 'react'; +import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; import { getMeasures } from '../../api/measures'; import { getSecurityHotspotList, getSecurityHotspots } from '../../api/security-hotspots'; import withComponentContext from '../../app/components/componentContext/withComponentContext'; @@ -32,7 +33,6 @@ import { isInput } from '../../helpers/keyboardEventHelpers'; import { KeyboardKeys } from '../../helpers/keycodes'; import { getStandards } from '../../helpers/security-standard'; import { withBranchLikes } from '../../queries/branch'; -import { getBranchLikeQuery } from '../../sonar-aligned/helpers/branch-like'; import { BranchLike } from '../../types/branch-like'; import { ComponentQualifier } from '../../types/component'; import { MetricKey } from '../../types/metrics'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/SecurityHotspotsAppRenderer.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/SecurityHotspotsAppRenderer.tsx index 8bafc990a3d..4cd77d139e3 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/SecurityHotspotsAppRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/SecurityHotspotsAppRenderer.tsx @@ -31,11 +31,11 @@ import { } from 'design-system'; import * as React from 'react'; import { Helmet } from 'react-helmet-async'; +import { isBranch } from '~sonar-aligned/helpers/branch-like'; import A11ySkipTarget from '../../components/a11y/A11ySkipTarget'; import Suggestions from '../../components/embed-docs-modal/Suggestions'; import { translate } from '../../helpers/l10n'; import useFollowScroll from '../../hooks/useFollowScroll'; -import { isBranch } from '../../sonar-aligned/helpers/branch-like'; import { BranchLike } from '../../types/branch-like'; import { ComponentQualifier } from '../../types/component'; import { MetricKey } from '../../types/metrics'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotHeader.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotHeader.tsx index 727ab6a2932..2fb0a348ab4 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotHeader.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotHeader.tsx @@ -27,14 +27,10 @@ import { StyledPageTitle, } from 'design-system'; import React from 'react'; +import { getComponentSecurityHotspotsUrl } from '~sonar-aligned/helpers/urls'; import { translate } from '../../../helpers/l10n'; -import { - getComponentSecurityHotspotsUrl, - getPathUrlAsString, - getRuleUrl, -} from '../../../helpers/urls'; +import { getPathUrlAsString, getRuleUrl } from '../../../helpers/urls'; import { useRefreshBranchStatus } from '../../../queries/branch'; -import { getBranchLikeQuery } from '../../../sonar-aligned/helpers/branch-like'; import { BranchLike } from '../../../types/branch-like'; import { SecurityStandard, Standards } from '../../../types/security'; import { Hotspot, HotspotStatusOption } from '../../../types/security-hotspots'; @@ -56,8 +52,7 @@ export function HotspotHeader(props: HotspotHeaderProps) { const refreshBranchStatus = useRefreshBranchStatus(); const permalink = getPathUrlAsString( - getComponentSecurityHotspotsUrl(component.key, { - ...getBranchLikeQuery(branchLike), + getComponentSecurityHotspotsUrl(component.key, branchLike, { hotspots: key, }), false, diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSidebarHeader.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSidebarHeader.tsx index 390490e2303..743b3ab14b1 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSidebarHeader.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSidebarHeader.tsx @@ -31,14 +31,14 @@ import { Spinner, } from 'design-system'; import * as React from 'react'; +import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip'; +import { isBranch } from '~sonar-aligned/helpers/branch-like'; import withComponentContext from '../../../app/components/componentContext/withComponentContext'; import withCurrentUserContext from '../../../app/components/current-user/withCurrentUserContext'; import Tooltip from '../../../components/controls/Tooltip'; import Measure from '../../../components/measure/Measure'; import { PopupPlacement } from '../../../components/ui/popups'; import { translate } from '../../../helpers/l10n'; -import HelpTooltip from '../../../sonar-aligned/components/controls/HelpTooltip'; -import { isBranch } from '../../../sonar-aligned/helpers/branch-like'; import { BranchLike } from '../../../types/branch-like'; import { ComponentContextShape } from '../../../types/component'; import { MetricKey, MetricType } from '../../../types/metrics'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetContainer.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetContainer.tsx index 92cbd6123a3..1462abbb52b 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetContainer.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetContainer.tsx @@ -18,9 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; import { getSources } from '../../../api/components'; import { locationsByLine } from '../../../components/SourceViewer/helpers/indexing'; -import { getBranchLikeQuery } from '../../../sonar-aligned/helpers/branch-like'; import { BranchLike } from '../../../types/branch-like'; import { Hotspot } from '../../../types/security-hotspots'; import { Component, ExpandDirection, FlowLocation, SourceLine } from '../../../types/types'; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/StatusUpdateSuccessModal.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/StatusUpdateSuccessModal.tsx index 7f081e17679..1f5b65e24e5 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/StatusUpdateSuccessModal.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/StatusUpdateSuccessModal.tsx @@ -20,9 +20,9 @@ import { ButtonPrimary, ButtonSecondary, Checkbox, Modal, Note } from 'design-system'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { save } from '../../../helpers/storage'; -import { formatMeasure } from '../../../sonar-aligned/helpers/measures'; import { HotspotStatusOption } from '../../../types/security-hotspots'; import { SHOW_STATUS_DIALOG_STORAGE_KEY } from '../constants'; |