aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/api/security-reports.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/api/security-reports.ts')
-rw-r--r--server/sonar-web/src/main/js/api/security-reports.ts12
1 files changed, 11 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/api/security-reports.ts b/server/sonar-web/src/main/js/api/security-reports.ts
index 2747ea7536f..74006076097 100644
--- a/server/sonar-web/src/main/js/api/security-reports.ts
+++ b/server/sonar-web/src/main/js/api/security-reports.ts
@@ -27,5 +27,15 @@ export function getSecurityHotspots(data: {
includeDistribution?: boolean;
branch?: string;
}): Promise<{ categories: Array<SecurityHotspot> }> {
- return getJSON('/api/security_reports/show', data).catch(throwGlobalError);
+ return getJSON('/api/security_reports/show', data)
+ .then(data => {
+ /* MOCK, must be removed after backend implementation */
+ data.categories = data.categories.map((v: SecurityHotspot, index: number) => {
+ v.activeRules = index;
+ v.totalRules = 200;
+ return v;
+ });
+ return data;
+ })
+ .catch(throwGlobalError);
}