aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/components/shared
diff options
context:
space:
mode:
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2018-03-12 12:06:11 +0100
committerTeryk Bellahsene <teryk@users.noreply.github.com>2018-03-13 14:05:36 +0100
commit913c82c8772fd4747626a1fbe665ccda2e5ca9f1 (patch)
treed48784851df80905ce125cc60ac8aec8570751a9 /server/sonar-web/src/main/js/components/shared
parent751e4000e40a4af66b80767d632b1bef64dc5647 (diff)
downloadsonarqube-913c82c8772fd4747626a1fbe665ccda2e5ca9f1.tar.gz
sonarqube-913c82c8772fd4747626a1fbe665ccda2e5ca9f1.zip
SONAR-10374 Support pull request in the web app
Diffstat (limited to 'server/sonar-web/src/main/js/components/shared')
-rw-r--r--server/sonar-web/src/main/js/components/shared/DrilldownLink.tsx8
1 files changed, 5 insertions, 3 deletions
diff --git a/server/sonar-web/src/main/js/components/shared/DrilldownLink.tsx b/server/sonar-web/src/main/js/components/shared/DrilldownLink.tsx
index 1065e91e9ef..ff5587d95b4 100644
--- a/server/sonar-web/src/main/js/components/shared/DrilldownLink.tsx
+++ b/server/sonar-web/src/main/js/components/shared/DrilldownLink.tsx
@@ -20,6 +20,8 @@
import * as React from 'react';
import { Link } from 'react-router';
import { getComponentDrilldownUrl, getComponentIssuesUrl } from '../../helpers/urls';
+import { BranchLike } from '../../app/types';
+import { getBranchLikeQuery } from '../../helpers/branches';
const ISSUE_MEASURES = [
'violations',
@@ -47,7 +49,7 @@ const ISSUE_MEASURES = [
];
interface Props {
- branch?: string;
+ branchLike?: BranchLike;
children?: React.ReactNode;
className?: string;
component: string;
@@ -121,7 +123,7 @@ export default class DrilldownLink extends React.PureComponent<Props> {
renderIssuesLink = () => {
const url = getComponentIssuesUrl(this.props.component, {
...this.propsToIssueParams(),
- branch: this.props.branch
+ ...getBranchLikeQuery(this.props.branchLike)
});
return (
@@ -139,7 +141,7 @@ export default class DrilldownLink extends React.PureComponent<Props> {
const url = getComponentDrilldownUrl(
this.props.component,
this.props.metric,
- this.props.branch
+ this.props.branchLike
);
return (
<Link to={url} className={this.props.className}>