]> source.dussan.org Git - sonarqube.git/commitdiff
display colorful ratings on leak period on measures page
authorStas Vilchik <vilchiks@gmail.com>
Thu, 27 Oct 2016 13:44:53 +0000 (15:44 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Thu, 27 Oct 2016 14:10:33 +0000 (16:10 +0200)
server/sonar-web/src/main/js/apps/component-measures/details/MeasureDetailsHeader.js
server/sonar-web/src/main/js/apps/component-measures/home/MeasureListValue.js
server/sonar-web/src/main/js/apps/component-measures/styles.css

index 07c90a9b306c1303b922a545273f30e79fba5e18..dfa4e81a60bf296d7f205fe2ce9e561810415911 100644 (file)
@@ -23,7 +23,7 @@ import Measure from './../components/Measure';
 import LanguageDistribution from '../../../components/charts/LanguageDistribution';
 import LeakPeriodLegend from '../components/LeakPeriodLegend';
 import { ComplexityDistribution } from '../../../components/shared/complexity-distribution';
-import { isDiffMetric, formatLeak } from '../utils';
+import { isDiffMetric } from '../utils';
 import { TooltipsContainer } from '../../../components/mixins/tooltips-mixin';
 import { getLocalizedMetricName } from '../../../helpers/l10n';
 
@@ -45,7 +45,7 @@ export default function MeasureDetailsHeader ({ measure, metric, secondaryMeasur
 
             {isDiffMetric(metric) ? (
                 <div className="measure-details-value-leak">
-                  {formatLeak(measure.leak, metric)}
+                  <Measure measure={measure} metric={metric}/>
                 </div>
             ) : (
                 <div className="measure-details-value-absolute">
index 3c61560f7210e2bca1a9ba334cef3d91977c7d5a..b7ef268f81cdf8f4bed17f0dedb4855eb92cba92 100644 (file)
@@ -21,7 +21,6 @@ import React from 'react';
 
 import Measure from '../components/Measure';
 import { isDiffMetric } from '../utils';
-import { formatMeasure } from '../../../helpers/measures';
 
 const MeasureListValue = ({ measure }) => {
   const { metric } = measure;
@@ -29,7 +28,7 @@ const MeasureListValue = ({ measure }) => {
   if (isDiffMetric(metric)) {
     return (
         <div id={`measure-${measure.metric.key}-leak`} className="domain-measures-value domain-measures-leak">
-          {formatMeasure(measure.leak, measure.metric.type)}
+          <Measure measure={measure}/>
         </div>
     );
   }
index de6130fc631969e759978bb433f1633cdb2ae52c..fe0a70df49678002fbcd5063abdd88aadc509e57 100644 (file)
 
 .domain-measures .domain-measures-name {
   width: calc(100% - 160px);
+  line-height: 24px;
 }
 
 .domain-measures .domain-measures-name > span {