From: Simon Brandhof Date: Thu, 8 Dec 2011 18:04:22 +0000 (+0100) Subject: Add icons to the select box of the widget Most Violated Rules X-Git-Tag: 2.13~140 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5345832bc2e812b68f9444cc04ac2a32c8839343;p=sonarqube.git Add icons to the select box of the widget Most Violated Rules --- diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_most_violated_rules.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_most_violated_rules.html.erb index 961f30a349a..0ef8719bb34 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_most_violated_rules.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_most_violated_rules.html.erb @@ -5,7 +5,7 @@ measures_by_severity = {} all_measures=[] - Api::Severity::KEYS.each do |key| + Severity::KEYS.each do |key| rule_measures = @snapshot.rule_measures(Metric.by_key("#{metric_prefix}#{key.downcase}_violations")) sorted_measures = rule_measures.select { |a| val = a.send(value_column) @@ -17,7 +17,7 @@ measures_by_severity['']=all_measures.sort { |a, b| b.send(value_column) <=> a.send(value_column) }[0...limit] default_severity = widget_properties['defaultSeverity']||'' - default_severity = '' unless Api::Severity::KEYS.include?(default_severity) + default_severity = '' unless Severity::KEYS.include?(default_severity) %>