aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorDavid Gageot <david@gageot.net>2012-05-11 11:55:28 +0200
committerDavid Gageot <david@gageot.net>2012-05-11 11:55:28 +0200
commit7d7ad8b78eb7773f852d75d2e9c0539695107053 (patch)
treeb239bda44872638c996cbc4640c85a8836e71112 /sonar-server
parent92f9daf5b22ea9261a3314c108dfa535a7780266 (diff)
downloadsonarqube-7d7ad8b78eb7773f852d75d2e9c0539695107053.tar.gz
sonarqube-7d7ad8b78eb7773f852d75d2e9c0539695107053.zip
Fix which default project dashboard to display
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb
index ab2f87e5b34..d01a2bd464c 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb
@@ -156,7 +156,7 @@ class DashboardController < ApplicationController
elsif params[:name]
@active=ActiveDashboard.find(:first, :include => 'dashboard', :conditions => ['dashboards.name=? AND active_dashboards.user_id=?', params[:name], current_user.id])
else
- @active=ActiveDashboard.find(:first, :include => 'dashboard', :conditions => ['active_dashboards.user_id=?', current_user.id], :order => 'order_index ASC')
+ @active=ActiveDashboard.user_dashboards(current_user).find { |a| !a.global? }
end
end
@@ -167,7 +167,7 @@ class DashboardController < ApplicationController
elsif params[:name]
@active=ActiveDashboard.find(:first, :include => 'dashboard', :conditions => ['dashboards.name=? AND active_dashboards.user_id IS NULL', params[:name]])
else
- @active=ActiveDashboard.find(:first, :include => 'dashboard', :conditions => ['active_dashboards.user_id IS NULL'], :order => 'order_index ASC')
+ @active=ActiveDashboard.user_dashboards(nil).find { |a| !a.global? }
end
end
@dashboard=(@active ? @active.dashboard : nil)