aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorDavid Gageot <david@gageot.net>2012-10-10 10:13:04 +0200
committerDavid Gageot <david@gageot.net>2012-10-10 10:13:04 +0200
commit73969e0c309b4bf5f9adb7b6c3b4e5e7becd97e5 (patch)
treedf3f9032e33b95d2c08d48af38ec302271a892b2 /sonar-server
parent92da0a8b2b2cad6e4604b646451a2a3ed3a67461 (diff)
downloadsonarqube-73969e0c309b4bf5f9adb7b6c3b4e5e7becd97e5.tar.gz
sonarqube-73969e0c309b4bf5f9adb7b6c3b4e5e7becd97e5.zip
SONAR-2804 Fix metrics category names and order
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb4
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/resource/_options.html.erb16
2 files changed, 10 insertions, 10 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb
index 11b71dc084c..6a78bb2c828 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb
@@ -184,8 +184,8 @@ class ResourceController < ApplicationController
@coverage_filter = (metric ? metric.key : 'coverage')
it_prefix = ''
- it_prefix = 'it_' if @coverage_filter.start_with?('it_')
- it_prefix = 'overall_' if @coverage_filter.start_with?('overall_')
+ it_prefix = 'it_' if (@coverage_filter.start_with?('it_') || @coverage_filter.start_with?('new_it_'))
+ it_prefix = 'overall_' if (@coverage_filter.start_with?('overall_') || @coverage_filter.start_with?('new_overall_'))
@hits_by_line = load_distribution("#{it_prefix}coverage_line_hits_data")
@conditions_by_line = load_distribution("#{it_prefix}conditions_by_line")
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_options.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_options.html.erb
index 8da520a23c2..34d774f440c 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_options.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_options.html.erb
@@ -67,14 +67,6 @@
<% if @display_coverage %>
<td class="<%= 'first' if first -%>">
<select id="coverage_filter" name="coverage_filter" onchange="applyOptions()">
- <% if @display_overall_coverage %>
- <optgroup label="<%= h message('coverage_viewer.overall_tests') -%>">
- <option value="overall_lines_to_cover" <%= 'selected' if @coverage_filter=='overall_lines_to_cover' -%>><%= Metric.name_for('overall_lines_to_cover') -%></option>
- <option value="overall_uncovered_lines" <%= 'selected' if @coverage_filter=='overall_uncovered_lines' -%>><%= Metric.name_for('overall_uncovered_lines') -%></option>
- <option value="overall_conditions_to_cover" <%= 'selected' if @coverage_filter=='overall_conditions_to_cover' -%>><%= Metric.name_for('overall_conditions_to_cover') -%></option>
- <option value="overall_uncovered_conditions" <%= 'selected' if @coverage_filter=='overall_uncovered_conditions' -%>><%= Metric.name_for('overall_uncovered_conditions') -%></option>
- </optgroup>
- <% end %>
<optgroup label="<%= h message('coverage_viewer.unit_tests') -%>">
<option value="lines_to_cover" <%= 'selected' if @coverage_filter=='lines_to_cover' -%>><%= Metric.name_for('lines_to_cover') -%></option>
<option value="uncovered_lines" <%= 'selected' if @coverage_filter=='uncovered_lines' -%>><%= Metric.name_for('uncovered_lines') -%></option>
@@ -89,6 +81,14 @@
<option value="it_uncovered_conditions" <%= 'selected' if @coverage_filter=='it_uncovered_conditions' -%>><%= Metric.name_for('it_uncovered_conditions') -%></option>
</optgroup>
<% end %>
+ <% if @display_overall_coverage %>
+ <optgroup label="<%= h message('coverage_viewer.overall_tests') -%>">
+ <option value="overall_lines_to_cover" <%= 'selected' if @coverage_filter=='overall_lines_to_cover' -%>><%= Metric.name_for('overall_lines_to_cover') -%></option>
+ <option value="overall_uncovered_lines" <%= 'selected' if @coverage_filter=='overall_uncovered_lines' -%>><%= Metric.name_for('overall_uncovered_lines') -%></option>
+ <option value="overall_conditions_to_cover" <%= 'selected' if @coverage_filter=='overall_conditions_to_cover' -%>><%= Metric.name_for('overall_conditions_to_cover') -%></option>
+ <option value="overall_uncovered_conditions" <%= 'selected' if @coverage_filter=='overall_uncovered_conditions' -%>><%= Metric.name_for('overall_uncovered_conditions') -%></option>
+ </optgroup>
+ <% end %>
</select>
</td>
<% first=false