aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server/src/main/webapp
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2010-09-13 17:54:36 +0000
committersimonbrandhof <simon.brandhof@gmail.com>2010-09-13 17:54:36 +0000
commitb384d1804d4d4759be92094ceb417276ed1dfecf (patch)
treec7f170689f9e15b44929c82b7661c2a1a8274940 /sonar-server/src/main/webapp
parentcdd05f32ec75a1594f8f86e1fdb0bd4101598654 (diff)
downloadsonarqube-b384d1804d4d4759be92094ceb417276ed1dfecf.tar.gz
sonarqube-b384d1804d4d4759be92094ceb417276ed1dfecf.zip
SONAR-1776 - Add a page Permalinks to the profile console
Diffstat (limited to 'sonar-server/src/main/webapp')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/resource_controller.rb1
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb5
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb2
3 files changed, 4 insertions, 4 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/resource_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/resource_controller.rb
index 7d7d596a5a0..05aae87c7bf 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/resource_controller.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/plugins/resource_controller.rb
@@ -20,6 +20,7 @@
class Plugins::ResourceController < ApplicationController
SECTION=Navigation::SECTION_RESOURCE
+ helper :project
def index
@project = ::Project.by_key(params[:id])
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb
index e5487a11ad7..93dd9d3e065 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb
@@ -176,12 +176,11 @@ class ProfilesController < ApplicationController
#
#
def export
- name = CGI::unescape(params[:name])
language = params[:language]
- if (name.blank?)
+ if (params[:name].blank?)
profile = Profile.find_active_profile_by_language(language)
else
- profile = Profile.find_by_name_and_language(name, language)
+ profile = Profile.find_by_name_and_language(CGI::unescape(params[:name]), language)
end
exporter_key = params[:format]
result = java_facade.exportProfile(profile.id, exporter_key)
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb
index 2207696bb3f..0fb92332142 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb
@@ -80,7 +80,7 @@
<tbody>
<% @profiles.select{|p| p.language==language.getKey()}.each do |profile| %>
<tr class="<%= cycle 'even', 'odd', :name => language.getKey() -%>" id="<%= u profile.key %>">
- <td><a href="<%= url_for :controller => 'rules_configuration', :action => 'index', :id => profile.id -%>"><%= h profile.name %></a></td>
+ <td><a href="<%= url_for :controller => 'rules_configuration', :action => 'index', :id => profile.id -%>" id="rules-<%= language.getKey() -%>-<%= u(profile.name) -%>"><%= h profile.name %></a></td>
<td align="right">
<span id="activated_rules_<%= u profile.key -%>"><%= profile.active_rules.count -%></span>