diff options
author | Stas Vilchik <stas.vilchik@sonarsource.com> | 2018-06-21 16:38:13 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-06-21 20:21:31 +0200 |
commit | 2b0f05f4442cb3e3b9c798adf9d93f64e19a6b01 (patch) | |
tree | c071cb8dc6dff71a2ad5a8e78c7b9ee97361eb0b /server/sonar-web/src/main/js/apps/overview/components/OverviewApp.tsx | |
parent | c7dde86fd2ffb20ad365b1eda4ebcf7dd68ea494 (diff) | |
download | sonarqube-2b0f05f4442cb3e3b9c798adf9d93f64e19a6b01.tar.gz sonarqube-2b0f05f4442cb3e3b9c798adf9d93f64e19a6b01.zip |
SONARCLOUD-81 Change canonical url to be absolute (#421)
Diffstat (limited to 'server/sonar-web/src/main/js/apps/overview/components/OverviewApp.tsx')
-rw-r--r-- | server/sonar-web/src/main/js/apps/overview/components/OverviewApp.tsx | 12 |
1 files changed, 8 insertions, 4 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 8ef2e875509..68a7d1bbb1d 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 @@ -48,7 +48,8 @@ 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 { getProjectUrl, getSonarCloudUrlAsString } from '../../../helpers/urls'; +import { isSonarCloud } from '../../../helpers/system'; import '../styles.css'; interface OwnProps { @@ -239,9 +240,12 @@ export class OverviewApp extends React.PureComponent<Props, State> { <div className="page page-limited"> <div className="overview page-with-sidebar"> <Suggestions suggestions="overview" /> - <Helmet> - <link href={getPathUrlAsString(getProjectUrl(component.key))} rel="canonical" /> - </Helmet> + + {isSonarCloud() && ( + <Helmet> + <link href={getSonarCloudUrlAsString(getProjectUrl(component.key))} rel="canonical" /> + </Helmet> + )} {this.renderMain()} |