]> source.dussan.org Git - sonarqube.git/commitdiff
Remove option color in format_variation as it this option is always activated and...
authorJulien Lancelot <julien.lancelot@gmail.com>
Fri, 12 Jul 2013 14:23:22 +0000 (16:23 +0200)
committerJulien Lancelot <julien.lancelot@gmail.com>
Fri, 12 Jul 2013 14:57:37 +0000 (16:57 +0200)
sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb

index f82cbee29b680493cc72195f1cc766412cbcafe2..2bea966249b68500a0cb722be25940bede5a158b 100644 (file)
@@ -486,7 +486,6 @@ module ApplicationHelper
   # Format variation value
   #
   # === Optional parameters
-  # * color: true|false. Default is true.
   # * period: integer between 1 and 5. By default the index is defined by the dashboard variation select-box
   # * style: light|normal|none. Default is normal (parenthesis + bold)
   #
@@ -509,18 +508,15 @@ module ApplicationHelper
         end
 
         formatted_val= m.format_numeric_value(val, :variation => true)
-        css_class=''
-        if options[:color]||true
-          css_class='var'
-          if m.metric.qualitative?
-            factor=m.metric.direction * val
-            if factor>0
-              # better
-              css_class='varb'
-            elsif factor<0
-              # worst
-              css_class='varw'
-            end
+        css_class='var'
+        if m.metric.qualitative?
+          factor=m.metric.direction * val
+          if factor>0
+            # better
+            css_class='varb'
+          elsif factor<0
+            # worst
+            css_class='varw'
           end
         end