aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src
diff options
context:
space:
mode:
authorStas Vilchik <stas.vilchik@sonarsource.com>2018-04-18 09:21:10 +0200
committerSonarTech <sonartech@sonarsource.com>2018-04-18 20:20:53 +0200
commitd934d49b71a08dbd813be287c18763a67245f65e (patch)
treefdca26a4706b246123d85503d8a0898e69ca9558 /server/sonar-web/src
parentd2a293cddf80582a1ee5a9397080611696b5a1c2 (diff)
downloadsonarqube-d934d49b71a08dbd813be287c18763a67245f65e.tar.gz
sonarqube-d934d49b71a08dbd813be287c18763a67245f65e.zip
SONARCLOUD-46 Add canonical tag to project dashboard pages (#163)
Diffstat (limited to 'server/sonar-web/src')
-rw-r--r--server/sonar-web/src/main/js/apps/overview/components/OverviewApp.tsx6
1 files changed, 6 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/apps/overview/components/OverviewApp.tsx b/server/sonar-web/src/main/js/apps/overview/components/OverviewApp.tsx
index f1860ce427e..03d85648299 100644
--- a/server/sonar-web/src/main/js/apps/overview/components/OverviewApp.tsx
+++ b/server/sonar-web/src/main/js/apps/overview/components/OverviewApp.tsx
@@ -20,6 +20,7 @@
import * as React from 'react';
import { uniq } from 'lodash';
import { connect } from 'react-redux';
+import { Helmet } from 'react-helmet';
import QualityGate from '../qualityGate/QualityGate';
import ApplicationQualityGate from '../qualityGate/ApplicationQualityGate';
import BugsAndVulnerabilities from '../main/BugsAndVulnerabilities';
@@ -46,6 +47,7 @@ import { fetchMetrics } from '../../../store/rootActions';
import { getMetrics } from '../../../store/rootReducer';
import { BranchLike, Component, Metric } from '../../../app/types';
import { translate } from '../../../helpers/l10n';
+import { getPathUrlAsString, getProjectUrl } from '../../../helpers/urls';
import '../styles.css';
interface OwnProps {
@@ -231,6 +233,10 @@ export class OverviewApp extends React.PureComponent<Props, State> {
return (
<div className="page page-limited">
<div className="overview page-with-sidebar">
+ <Helmet>
+ <link href={getPathUrlAsString(getProjectUrl(component.key))} rel="canonical" />
+ </Helmet>
+
{this.renderMain()}
<div className="overview-sidebar page-sidebar-fixed">