aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/overview/pullRequests
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/apps/overview/pullRequests')
-rw-r--r--server/sonar-web/src/main/js/apps/overview/pullRequests/BranchQualityGate.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/overview/pullRequests/BranchQualityGateConditions.tsx17
-rw-r--r--server/sonar-web/src/main/js/apps/overview/pullRequests/IssueMeasuresCard.tsx6
-rw-r--r--server/sonar-web/src/main/js/apps/overview/pullRequests/MeasuresCardPanel.tsx8
-rw-r--r--server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestMetaTopBar.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestOverview.tsx2
6 files changed, 17 insertions, 20 deletions
diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/BranchQualityGate.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/BranchQualityGate.tsx
index 45315610a8a..f2de2bdbcc3 100644
--- a/server/sonar-web/src/main/js/apps/overview/pullRequests/BranchQualityGate.tsx
+++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/BranchQualityGate.tsx
@@ -20,7 +20,7 @@
import { HelperHintIcon, LightPrimary, QualityGateIndicator, TextMuted } from 'design-system';
import React from 'react';
import { useIntl } from 'react-intl';
-import HelpTooltip from '../../../sonar-aligned/components/controls/HelpTooltip';
+import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip';
import { BranchLike } from '../../../types/branch-like';
import { QualityGateStatusConditionEnhanced } from '../../../types/quality-gates';
import { Component, Status } from '../../../types/types';
diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/BranchQualityGateConditions.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/BranchQualityGateConditions.tsx
index f2586295e7e..b8efbefac42 100644
--- a/server/sonar-web/src/main/js/apps/overview/pullRequests/BranchQualityGateConditions.tsx
+++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/BranchQualityGateConditions.tsx
@@ -21,6 +21,12 @@ import styled from '@emotion/styled';
import { Badge, ButtonSecondary, themeBorder, themeColor } from 'design-system';
import 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 {
DEFAULT_ISSUES_QUERY,
isIssueMeasure,
@@ -28,13 +34,7 @@ import {
} from '../../../components/shared/utils';
import { getLocalizedMetricName, translate } from '../../../helpers/l10n';
import { getShortType, isDiffMetric } from '../../../helpers/measures';
-import {
- getComponentDrilldownUrl,
- getComponentIssuesUrl,
- getComponentSecurityHotspotsUrl,
-} from '../../../helpers/urls';
-import { getBranchLikeQuery } from '../../../sonar-aligned/helpers/branch-like';
-import { formatMeasure } from '../../../sonar-aligned/helpers/measures';
+import { getComponentDrilldownUrl } from '../../../helpers/urls';
import { BranchLike } from '../../../types/branch-like';
import { IssueType } from '../../../types/issues';
import { MetricType } from '../../../types/metrics';
@@ -182,8 +182,7 @@ function getQGConditionUrl(
if (ratingIssueType) {
if (ratingIssueType === IssueType.SecurityHotspot) {
- return getComponentSecurityHotspotsUrl(componentKey, {
- ...getBranchLikeQuery(branchLike),
+ return getComponentSecurityHotspotsUrl(componentKey, branchLike, {
...(sinceLeakPeriod ? { sinceLeakPeriod: 'true' } : {}),
});
}
diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/IssueMeasuresCard.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/IssueMeasuresCard.tsx
index 613c243c5d4..3d44d54c7ed 100644
--- a/server/sonar-web/src/main/js/apps/overview/pullRequests/IssueMeasuresCard.tsx
+++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/IssueMeasuresCard.tsx
@@ -33,12 +33,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 } from '~sonar-aligned/helpers/urls';
import { getLeakValue } from '../../../components/measure/utils';
import { DEFAULT_ISSUES_QUERY } from '../../../components/shared/utils';
import { findMeasure } from '../../../helpers/measures';
-import { getComponentIssuesUrl } from '../../../helpers/urls';
-import { getBranchLikeQuery } from '../../../sonar-aligned/helpers/branch-like';
-import { formatMeasure } from '../../../sonar-aligned/helpers/measures';
import { PullRequest } from '../../../types/branch-like';
import { MetricKey, MetricType } from '../../../types/metrics';
import { QualityGateStatusConditionEnhanced } from '../../../types/quality-gates';
diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/MeasuresCardPanel.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/MeasuresCardPanel.tsx
index ec42bcb0ce0..d2119340bc2 100644
--- a/server/sonar-web/src/main/js/apps/overview/pullRequests/MeasuresCardPanel.tsx
+++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/MeasuresCardPanel.tsx
@@ -19,10 +19,10 @@
*/
import classNames from 'classnames';
import * as React from 'react';
+import { getComponentSecurityHotspotsUrl } from '~sonar-aligned/helpers/urls';
import { getLeakValue } from '../../../components/measure/utils';
import { findMeasure } from '../../../helpers/measures';
-import { getComponentDrilldownUrl, getComponentSecurityHotspotsUrl } from '../../../helpers/urls';
-import { getBranchLikeQuery } from '../../../sonar-aligned/helpers/branch-like';
+import { getComponentDrilldownUrl } from '../../../helpers/urls';
import { PullRequest } from '../../../types/branch-like';
import { MetricKey } from '../../../types/metrics';
import { QualityGateStatusConditionEnhanced } from '../../../types/quality-gates';
@@ -83,9 +83,7 @@ export default function MeasuresCardPanel(props: React.PropsWithChildren<Props>)
? 'issue.type.SECURITY_HOTSPOT'
: 'issue.type.SECURITY_HOTSPOT.plural'
}
- url={getComponentSecurityHotspotsUrl(component.key, {
- ...getBranchLikeQuery(pullRequest),
- })}
+ url={getComponentSecurityHotspotsUrl(component.key, pullRequest)}
value={newSecurityHotspots}
metric={MetricKey.new_security_hotspots}
conditions={conditions}
diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestMetaTopBar.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestMetaTopBar.tsx
index aae9b023155..1a248f65983 100644
--- a/server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestMetaTopBar.tsx
+++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestMetaTopBar.tsx
@@ -20,10 +20,10 @@
import { SeparatorCircleIcon } from 'design-system';
import React from 'react';
import { useIntl } from 'react-intl';
+import { formatMeasure } from '~sonar-aligned/helpers/measures';
import CurrentBranchLikeMergeInformation from '../../../app/components/nav/component/branch-like/CurrentBranchLikeMergeInformation';
import { getLeakValue } from '../../../components/measure/utils';
import { findMeasure } from '../../../helpers/measures';
-import { formatMeasure } from '../../../sonar-aligned/helpers/measures';
import { PullRequest } from '../../../types/branch-like';
import { MetricKey, MetricType } from '../../../types/metrics';
import { MeasureEnhanced } from '../../../types/types';
diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestOverview.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestOverview.tsx
index f773f5abc5d..adf3fc71408 100644
--- a/server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestOverview.tsx
+++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestOverview.tsx
@@ -20,12 +20,12 @@
import { BasicSeparator, CenteredLayout, PageContentFontWrapper, Spinner } from 'design-system';
import { uniq } from 'lodash';
import * as React from 'react';
+import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like';
import { enhanceConditionWithMeasure, enhanceMeasuresWithMetrics } from '../../../helpers/measures';
import { isDefined } from '../../../helpers/types';
import { useBranchStatusQuery } from '../../../queries/branch';
import { useComponentMeasuresWithMetricsQuery } from '../../../queries/component';
import { useComponentQualityGateQuery } from '../../../queries/quality-gates';
-import { getBranchLikeQuery } from '../../../sonar-aligned/helpers/branch-like';
import { PullRequest } from '../../../types/branch-like';
import { Component } from '../../../types/types';
import { AnalysisStatus } from '../components/AnalysisStatus';