diff options
Diffstat (limited to 'server')
-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: { |