diff options
author | Pascal Mugnier <pascal.mugnier@sonarsource.com> | 2018-10-22 14:40:40 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-10-25 20:21:01 +0200 |
commit | f068d7b2430a1cd2b05da22b6fd885231d3baec5 (patch) | |
tree | 656613bf72255a25b5ffd43f195c359436b359c2 /server/sonar-web/src/main/js/api | |
parent | 3c6746a4fb3f375e81fbe44d4994206cd73de48b (diff) | |
download | sonarqube-f068d7b2430a1cd2b05da22b6fd885231d3baec5.tar.gz sonarqube-f068d7b2430a1cd2b05da22b6fd885231d3baec5.zip |
SONAR-11369 Update UI using WS mock
Diffstat (limited to 'server/sonar-web/src/main/js/api')
-rw-r--r-- | server/sonar-web/src/main/js/api/security-reports.ts | 12 |
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); } |