]> source.dussan.org Git - sonarqube.git/commitdiff
fix display of leak values for RATING and LEVEL measures
authorStas Vilchik <vilchiks@gmail.com>
Fri, 11 Mar 2016 15:49:41 +0000 (16:49 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Fri, 11 Mar 2016 15:49:41 +0000 (16:49 +0100)
server/sonar-web/src/main/js/apps/component-measures/components/MeasureDetailsHeader.js

index 12a2a24a59571a3be7f2e863cb213373d38100c9..59a9a3c9eeea4798d1489b03f2ff2766ab6b61fd 100644 (file)
@@ -39,6 +39,8 @@ export default function MeasureDetailsHeader (
 ) {
   const leakPeriodTooltip = translateWithParameters('overview.leak_period_x', leakPeriodLabel);
 
+  const displayLeak = measure.leak != null && metric.type !== 'RATING' && metric.type !== 'LEVEL';
+
   return (
       <header className="measure-details-header">
         <h2 className="measure-details-metric">
@@ -63,7 +65,7 @@ export default function MeasureDetailsHeader (
                 </div>
             )}
 
-            {measure.leak != null && (
+            {displayLeak && (
                 <div
                     className="measure-details-value-leak"
                     title={leakPeriodTooltip}