diff options
author | Pascal Mugnier <pascal.mugnier@sonarsource.com> | 2018-04-17 09:18:52 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-04-18 20:20:53 +0200 |
commit | 95dea523fad5239c13791404aff7a4d0dadd12d3 (patch) | |
tree | 2b5ed7a83e361e0f3d1847b32526f83498fdc74f /server/sonar-web/src/main/js/apps/portfolio | |
parent | a22bc323f8d43fb243031ead669c5ff876f75c0a (diff) | |
download | sonarqube-95dea523fad5239c13791404aff7a4d0dadd12d3.tar.gz sonarqube-95dea523fad5239c13791404aff7a4d0dadd12d3.zip |
SONAR-9843 Open measure page in blank page when middle click on a file
Diffstat (limited to 'server/sonar-web/src/main/js/apps/portfolio')
4 files changed, 8 insertions, 6 deletions
diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/Effort.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/Effort.tsx index 4029dbe7a38..d2f0235d455 100644 --- a/server/sonar-web/src/main/js/apps/portfolio/components/Effort.tsx +++ b/server/sonar-web/src/main/js/apps/portfolio/components/Effort.tsx @@ -39,7 +39,7 @@ export default function Effort({ component, effort, metricKey }: Props) { id="portfolio.x_in_y" values={{ projects: ( - <Link to={getComponentDrilldownUrl(component, metricKey)}> + <Link to={getComponentDrilldownUrl({ componentKey: component, metric: metricKey })}> <span> <Measure className="little-spacer-right" diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/MeasuresButtonLink.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/MeasuresButtonLink.tsx index 8cb9d28bc76..9f90824d2b8 100644 --- a/server/sonar-web/src/main/js/apps/portfolio/components/MeasuresButtonLink.tsx +++ b/server/sonar-web/src/main/js/apps/portfolio/components/MeasuresButtonLink.tsx @@ -31,7 +31,7 @@ export default function MeasuresButtonLink({ component, metric }: Props) { return ( <Link className="button button-small spacer-left text-text-bottom" - to={getComponentDrilldownUrl(component, metric)}> + to={getComponentDrilldownUrl({ componentKey: component, metric })}> <BubblesIcon size={14} /> </Link> ); diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/ReleasabilityBox.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/ReleasabilityBox.tsx index a33d40f9ef1..3dd30c83541 100644 --- a/server/sonar-web/src/main/js/apps/portfolio/components/ReleasabilityBox.tsx +++ b/server/sonar-web/src/main/js/apps/portfolio/components/ReleasabilityBox.tsx @@ -41,7 +41,7 @@ export default function ReleasabilityBox({ component, measures }: Props) { {rating && ( <Link - to={getComponentDrilldownUrl(component, 'alert_status')} + to={getComponentDrilldownUrl({ componentKey: component, metric: 'alert_status' })} className="portfolio-box-rating"> <Rating value={rating} /> </Link> @@ -52,7 +52,8 @@ export default function ReleasabilityBox({ component, measures }: Props) { {effort && Number(effort) > 0 && ( <div className="portfolio-effort"> - <Link to={getComponentDrilldownUrl(component, 'alert_status')}> + <Link + to={getComponentDrilldownUrl({ componentKey: component, metric: 'alert_status' })}> <span> <Measure className="little-spacer-right" diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/Summary.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/Summary.tsx index 7d438b6167f..3f3ed3e1253 100644 --- a/server/sonar-web/src/main/js/apps/portfolio/components/Summary.tsx +++ b/server/sonar-web/src/main/js/apps/portfolio/components/Summary.tsx @@ -41,7 +41,8 @@ export default function Summary({ component, measures }: Props) { <li> <div className="portfolio-measure-secondary-value"> {projects ? ( - <Link to={getComponentDrilldownUrl(component.key, 'projects')}> + <Link + to={getComponentDrilldownUrl({ componentKey: component.key, metric: 'projects' })}> <Measure metricKey="projects" metricType="SHORT_INT" value={projects} /> </Link> ) : ( @@ -53,7 +54,7 @@ export default function Summary({ component, measures }: Props) { <li> <div className="portfolio-measure-secondary-value"> {ncloc ? ( - <Link to={getComponentDrilldownUrl(component.key, 'ncloc')}> + <Link to={getComponentDrilldownUrl({ componentKey: component.key, metric: 'ncloc' })}> <Measure metricKey="ncloc" metricType="SHORT_INT" value={ncloc} /> </Link> ) : ( |