diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2011-08-18 12:03:03 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2011-08-18 12:03:03 +0200 |
commit | 6ec8c8da9567b39a3deb700afa913f2132f87180 (patch) | |
tree | 6141a91ea4617d25e537304ceabc8ddd916fc909 | |
parent | 8a492ff267bccae3653331918f6fc3d3a11737dc (diff) | |
download | sonarqube-6ec8c8da9567b39a3deb700afa913f2132f87180.tar.gz sonarqube-6ec8c8da9567b39a3deb700afa913f2132f87180.zip |
SONAR-2713 default category is 'General'
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/controllers/settings_controller.rb | 8 | ||||
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/views/settings/_plugins.html.erb | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/settings_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/settings_controller.rb index a936793ac29..487456bd8e9 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/settings_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/settings_controller.rb @@ -25,7 +25,7 @@ class SettingsController < ApplicationController def index return access_denied unless is_admin? - load_properties() + load_properties(false) @category ||= 'General' end @@ -39,7 +39,7 @@ class SettingsController < ApplicationController resource_id=nil end - load_properties() + load_properties(true) if @category && @properties_per_category[@category] @properties_per_category[@category].each do |property| @@ -70,11 +70,11 @@ class SettingsController < ApplicationController private - def load_properties + def load_properties(all=true) @category=params[:category] @properties_per_category={} java_facade.getPluginsMetadata().each do |plugin| - java_facade.getPluginProperties(plugin).select { |property| property.global }.each do |property| + java_facade.getPluginProperties(plugin).select { |property| all || property.global }.each do |property| category = (property.category().present? ? property.category() : plugin.name()) @properties_per_category[category]||=[] @properties_per_category[category]<<property diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/settings/_plugins.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/settings/_plugins.html.erb index b56c661fdf2..5263a9b9bf3 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/settings/_plugins.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/settings/_plugins.html.erb @@ -59,7 +59,7 @@ </td> <td class="column"> - <% if @category + <% if @category && @properties_per_category[@category] && !@properties_per_category[@category].empty? category_name = message("property.category.#{@category}", :default => @category) %> |