diff options
author | Philippe Perrin <philippe.perrin@sonarsource.com> | 2020-01-09 14:50:31 +0100 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2020-01-13 20:46:38 +0100 |
commit | e12b4607189729f0b78a05bd53c42f41e6893d05 (patch) | |
tree | d38f8e7f244c3f22b562bad81b4cf06058af48bc /server/sonar-web/src | |
parent | e174fc4437e276857bd7b820f905515bc9ce29f1 (diff) | |
download | sonarqube-e12b4607189729f0b78a05bd53c42f41e6893d05.tar.gz sonarqube-e12b4607189729f0b78a05bd53c42f41e6893d05.zip |
SONAR-12722 Security report hotspot's link point to the new hotspot page
Diffstat (limited to 'server/sonar-web/src')
-rw-r--r-- | server/sonar-web/src/main/js/app/components/extensions/exposeLibraries.ts | 7 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/helpers/urls.ts | 7 |
2 files changed, 13 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/app/components/extensions/exposeLibraries.ts b/server/sonar-web/src/main/js/app/components/extensions/exposeLibraries.ts index f79ab41aefb..dd34f0fc164 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/exposeLibraries.ts +++ b/server/sonar-web/src/main/js/app/components/extensions/exposeLibraries.ts @@ -86,7 +86,11 @@ import { renderSansTop25Category, renderSonarSourceSecurityCategory } from '../../../helpers/security-standard'; -import { getComponentIssuesUrl, getRulesUrl } from '../../../helpers/urls'; +import { + getComponentIssuesUrl, + getComponentSecurityHotspotsUrl, + getRulesUrl +} from '../../../helpers/urls'; import addGlobalSuccessMessage from '../../utils/addGlobalSuccessMessage'; import throwGlobalError from '../../utils/throwGlobalError'; import A11ySkipTarget from '../a11y/A11ySkipTarget'; @@ -109,6 +113,7 @@ const exposeLibraries = () => { renderSansTop25Category, renderSonarSourceSecurityCategory, getComponentIssuesUrl, + getComponentSecurityHotspotsUrl, getRulesUrl }; global.SonarMeasures = { ...measures, formatMeasure }; diff --git a/server/sonar-web/src/main/js/helpers/urls.ts b/server/sonar-web/src/main/js/helpers/urls.ts index da55e2cc2e9..5daea42ff6e 100644 --- a/server/sonar-web/src/main/js/helpers/urls.ts +++ b/server/sonar-web/src/main/js/helpers/urls.ts @@ -74,6 +74,13 @@ export function getComponentIssuesUrl(componentKey: string, query?: Query): Loca } /** + * Generate URL for a component's security hotspot page + */ +export function getComponentSecurityHotspotsUrl(componentKey: string): Location { + return { pathname: '/security_hotspots', query: { id: componentKey } }; +} + +/** * Generate URL for a component's drilldown page */ export function getComponentDrilldownUrl(options: { |