From 14a1f07edeab1f1fca1785679c9f2d15bc24c76e Mon Sep 17 00:00:00 2001 From: simonbrandhof Date: Wed, 7 Dec 2011 21:33:01 +0100 Subject: SONAR-3046 the link 'More' must contain the selected period and severity --- .../core/widgets/hotspots/hotspot_most_violated_rules.html.erb | 6 ++++-- .../src/main/webapp/WEB-INF/app/controllers/drilldown_controller.rb | 4 ++-- 2 files changed, 6 insertions(+), 4 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 5d894f5c212..0674eb1dc51 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 @@ -32,12 +32,14 @@
- <%= message('widget.hotspot_metric.more') -%> + + <%= message('widget.hotspot_metric.more') -%> +

<%= message(dashboard_configuration.selected_period? ? 'widget.hotspot_most_violated_rules.name_when_period' : 'widget.hotspot_most_violated_rules.name') -%> - <% Api::Severity::KEYS.each do |key| %> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/drilldown_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/drilldown_controller.rb index 3671f1dd71a..87e7485f356 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/drilldown_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/drilldown_controller.rb @@ -80,7 +80,7 @@ class DrilldownController < ApplicationController @severity = params[:severity] || params[:priority] @rule_severity = params[:rule_sev] || @severity - if @rule_severity + if @rule_severity.present? # Filter resources by severity @metric = Metric::by_key("#{metric_prefix}#{@rule_severity.downcase}_violations") else @@ -120,7 +120,7 @@ class DrilldownController < ApplicationController # # Initialize filter by rule # - if @severity + if @severity.present? # Filter on severity -> filter rule measures by the selected metric @rule_measures = @snapshot.rule_measures(@metric) else -- cgit v1.2.3