diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2016-10-28 09:38:30 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2016-10-28 09:40:40 +0200 |
commit | e0ae4a26c5dad932325b50de173d845688f89dbd (patch) | |
tree | 08f41bc77ce61a8a3c7da7fb7d74674a5635da0f /server/sonar-web | |
parent | 0437299b4e9593501fdc34e94ccd0898704b1418 (diff) | |
download | sonarqube-e0ae4a26c5dad932325b50de173d845688f89dbd.tar.gz sonarqube-e0ae4a26c5dad932325b50de173d845688f89dbd.zip |
SONAR-8324 Fix maintainability rating tooltip
Diffstat (limited to 'server/sonar-web')
-rw-r--r-- | server/sonar-web/src/main/js/helpers/measures.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/js/helpers/measures.js b/server/sonar-web/src/main/js/helpers/measures.js index 9771331973b..8473c9e49ed 100644 --- a/server/sonar-web/src/main/js/helpers/measures.js +++ b/server/sonar-web/src/main/js/helpers/measures.js @@ -266,7 +266,7 @@ function shouldDisplayDays (days) { return days > 0; } -function shouldDisplayDaysInShortFormat(days) { +function shouldDisplayDaysInShortFormat (days) { return days > 0.9; } @@ -366,7 +366,6 @@ function shortDurationVariationFormatter (value) { return formatted[0] !== '-' ? '+' + formatted : formatted; } - let maintainabilityRatingGrid; function getMaintainabilityRatingGrid () { if (maintainabilityRatingGrid) { @@ -395,7 +394,8 @@ function getMaintainabilityRatingTooltip (rating) { if (rating < 2) { return translateWithParameters( 'metric.sqale_rating.tooltip.A', - `${maintainabilityGrid[0]}%`); + formatMeasure(maintainabilityGrid[0] * 100, 'PERCENT') + ); } const ratingLetter = formatMeasure(rating, 'RATING'); @@ -403,7 +403,8 @@ function getMaintainabilityRatingTooltip (rating) { return translateWithParameters( 'metric.sqale_rating.tooltip', ratingLetter, - `${maintainabilityRatingThreshold}%`); + formatMeasure(maintainabilityRatingThreshold * 100, 'PERCENT') + ); } export function getRatingTooltip (metricKey, value) { |