diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2011-10-19 23:07:44 +0200 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2011-10-19 23:15:01 +0200 |
commit | 2a71b4dffc86f4c42eea216dad902af82d23d6f7 (patch) | |
tree | df38acaaeeb19826fdba20a1352d701bcea09ac4 /sonar-server/src/main/webapp/WEB-INF/app/controllers | |
parent | 6c0ae292c9d12eaa61b1507831eb9905ea2c6c40 (diff) | |
download | sonarqube-2a71b4dffc86f4c42eea216dad902af82d23d6f7.tar.gz sonarqube-2a71b4dffc86f4c42eea216dad902af82d23d6f7.zip |
Various improvements on sorting of rows in UI
SONAR-2697 list of users in administration pages of roles
SONAR-2695 list of dashboards, filters, event categories, manual metrics and rules (in Quality Profiles)
Diffstat (limited to 'sonar-server/src/main/webapp/WEB-INF/app/controllers')
4 files changed, 5 insertions, 6 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/admin_dashboards_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/admin_dashboards_controller.rb index d57f4dd806b..a6653fe99b5 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/admin_dashboards_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/admin_dashboards_controller.rb @@ -26,7 +26,7 @@ class AdminDashboardsController < ApplicationController before_filter :load_default_dashboards def index - @default_dashboards=::Dashboard.find(:all, :conditions => {:shared => true}) + @default_dashboards=::Dashboard.find(:all, :conditions => {:shared => true}).sort{|a,b| a.name.downcase<=>b.name.downcase} ids=@actives.map{|af| af.dashboard_id} if !ids.nil? && !ids.empty? @default_dashboards=@default_dashboards.reject!{|f| ids.include?(f.id) } diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/admin_filters_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/admin_filters_controller.rb index 8ac69071732..8e2202f50b3 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/admin_filters_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/admin_filters_controller.rb @@ -27,7 +27,7 @@ class AdminFiltersController < ApplicationController before_filter :load_active_filters def index - @shared_filters=::Filter.find(:all, :conditions => {:shared => true}) + @shared_filters=::Filter.find(:all, :conditions => {:shared => true}).sort{|a,b| a.name.downcase<=>b.name.downcase} ids=@actives.map{|af| af.filter_id} @shared_filters.reject!{|f| ids.include?(f.id) } end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb index b420f46502a..150d50153e0 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb @@ -31,8 +31,7 @@ class RolesController < ApplicationController def projects @projects=Project.find(:all, :conditions => {:enabled=>true, :scope => Project::SCOPE_SET, :qualifier => [Project::QUALIFIER_VIEW, Project::QUALIFIER_SUBVIEW, Project::QUALIFIER_PROJECT]}, - :include => ['user_roles', 'group_roles'], - :order => 'name') + :include => ['user_roles', 'group_roles']).sort{|a,b| a.name.downcase<=>b.name.downcase} end def edit_users diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/users_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/users_controller.rb index 7c54458f96c..cc5d91ad9ac 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/users_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/users_controller.rb @@ -52,7 +52,7 @@ class UsersController < ApplicationController end def index - @users = User.find(:all, :include => 'groups', :order => 'name') + @users = User.find(:all, :include => 'groups') if params[:id] @user = User.find(params[:id]) else @@ -69,7 +69,7 @@ class UsersController < ApplicationController end def change_password - @users = User.find(:all, :include => 'groups', :order => 'name') + @users = User.find(:all, :include => 'groups') @user = User.find(params[:id]) render :action => 'index', :id => params[:id] end |