summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2011-12-08 19:04:22 +0100
committerSimon Brandhof <simon.brandhof@gmail.com>2011-12-08 19:07:46 +0100
commit5345832bc2e812b68f9444cc04ac2a32c8839343 (patch)
tree511f358ff9855c24dc8753c523273e89221eb743 /plugins
parent35725ec31949677255972dc0fc5405adccca8260 (diff)
downloadsonarqube-5345832bc2e812b68f9444cc04ac2a32c8839343.tar.gz
sonarqube-5345832bc2e812b68f9444cc04ac2a32c8839343.zip
Add icons to the select box of the widget Most Violated Rules
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_most_violated_rules.html.erb10
1 files changed, 5 insertions, 5 deletions
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)
%>
<script type="text/javascript">
@@ -39,10 +39,10 @@
<h3>
<%= message(dashboard_configuration.selected_period? ? 'widget.hotspot_most_violated_rules.name_when_period' : 'widget.hotspot_most_violated_rules.name') -%>
- <select class="small" style="margin-left: 20px" onchange="showMostViolatedRules<%= widget.id -%>(this.value);" id="select-severity_<%= widget.id -%>">
+ <select class="small withIcons" style="margin-left: 20px" onchange="showMostViolatedRules<%= widget.id -%>(this.value);" id="select-severity_<%= widget.id -%>">
<option value="" <%= 'selected' if default_severity=='' -%>><%= message('widget.hotspot_most_violated_rules.any_severity') -%></option>
- <% Api::Severity::KEYS.each do |key| %>
- <option value="<%= key -%>" <%= 'selected' if default_severity==key -%>><%= message("severity.#{key}") -%></option>
+ <% Severity::KEYS.each do |key| %>
+ <option class="sev_<%= key -%>" value="<%= key -%>" <%= 'selected' if default_severity==key -%>><%= message("severity.#{key}") -%></option>
<% end %>
</select>
</h3>