From: Stas Vilchik Date: Thu, 27 Aug 2015 10:28:05 +0000 (+0200) Subject: fix SONAR-6203 Manual Metrics of type Level and Text can't be displayed using 'Custom... X-Git-Tag: 5.2-RC1~592 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bc14bd9bdfa9c983a0dc21d6e2b2d0d9a3f487cd;p=sonarqube.git fix SONAR-6203 Manual Metrics of type Level and Text can't be displayed using 'Custom Measures' widget --- diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb index 4fc10646ce1..a096f806bfa 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb @@ -277,7 +277,7 @@ module ApplicationHelper if options[:period] html=m.format_numeric_value(m.variation(options[:period].to_i)) elsif m.metric.val_type==Metric::VALUE_TYPE_LEVEL - html="" unless m.alert_status.blank? + html=message("level.#{m.formatted_value}") else html=m.formatted_value end diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties index 58d6c50ea00..8931869679c 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -393,6 +393,18 @@ qualifiers.create.DEV=Create Developer qualifiers.update.VW=Update View qualifiers.update.DEV=Update Developer +#------------------------------------------------------------------------------ +# +# LEVELS +# +#------------------------------------------------------------------------------ + +level.OK=Ok +level.WARN=Warning +level.ERROR=Error + + + #------------------------------------------------------------------------------ # # PROJECT LINKS