diff options
author | Wouter Admiraal <wouter.admiraal@sonarsource.com> | 2018-12-24 12:35:10 +0100 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-12-26 20:20:58 +0100 |
commit | ea6102e599b37a73cce37675bff9456338c1f75f (patch) | |
tree | 42092c04ebe4f44c8cd646477f5a40ddc34ab9b9 /server/sonar-web/src/main/js/helpers/urls.ts | |
parent | a9fd4eb48b2ae984bdcac4e2e8ebdd16d5ac3a76 (diff) | |
download | sonarqube-ea6102e599b37a73cce37675bff9456338c1f75f.tar.gz sonarqube-ea6102e599b37a73cce37675bff9456338c1f75f.zip |
SONAR-10649 Add Markdown format for badges
Diffstat (limited to 'server/sonar-web/src/main/js/helpers/urls.ts')
-rw-r--r-- | server/sonar-web/src/main/js/helpers/urls.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/helpers/urls.ts b/server/sonar-web/src/main/js/helpers/urls.ts index c8c7db886a5..ff94ab0fee8 100644 --- a/server/sonar-web/src/main/js/helpers/urls.ts +++ b/server/sonar-web/src/main/js/helpers/urls.ts @@ -44,8 +44,10 @@ export function getHostUrl(): string { return window.location.origin + getBaseUrl(); } -export function getPathUrlAsString(path: Location): string { - return `${getBaseUrl()}${path.pathname}?${stringify(omitBy(path.query, isNil))}`; +export function getPathUrlAsString(path: Location, internal = true): string { + return `${internal ? getBaseUrl() : getHostUrl()}${path.pathname}?${stringify( + omitBy(path.query, isNil) + )}`; } export function getProjectUrl(project: string, branch?: string): Location { |