]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-2902 Open the resource viewer on the right tab
authorFabrice Bellingard <bellingard@gmail.com>
Thu, 10 Nov 2011 13:32:01 +0000 (14:32 +0100)
committerFabrice Bellingard <bellingard@gmail.com>
Thu, 10 Nov 2011 13:34:50 +0000 (14:34 +0100)
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspot_metric.html.erb
sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb

index 250b7fc553d20f612e72ed334c9ab4fc8781444e..fd7f9aaa1943efade2b27da6e85f312d000a8325 100644 (file)
@@ -67,7 +67,7 @@
 %>
     <tr class="<%= cycle 'even','odd', :name => ('hotspot_metric' + widget.id.to_s) -%>">
       <td>
-        <%= link_to_resource(resource, resource.name) -%>
+        <%= link_to_resource(resource, resource.name, {:metric => metric.name}) -%>
       </td>
       <td class="right">
         <%= format_measure(measure) -%>
index de128aa09bb4b6c6dee0628f3a6e9cb7753a8529..5a3533d631be0c93da603554d8032e1d372b0bad 100644 (file)
@@ -336,7 +336,7 @@ module ApplicationHelper
       if options[:line]
         anchor= 'L' + options[:line].to_s
       end
-      link_to(name || resource.name, {:controller => 'resource', :action => 'index', :anchor => anchor, :id => resource.id, :period => period_index, :tab => options[:tab], :rule => options[:rule]}, :popup => ['resource', 'height=800,width=900,scrollbars=1,resizable=1'], :title => options[:title])
+      link_to(name || resource.name, {:controller => 'resource', :action => 'index', :anchor => anchor, :id => resource.id, :period => period_index, :tab => options[:tab], :rule => options[:rule], :metric => options[:metric]}, :popup => ['resource', 'height=800,width=900,scrollbars=1,resizable=1'], :title => options[:title])
     end
   end