]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6331 open overview by default
authorStas Vilchik <vilchiks@gmail.com>
Mon, 30 Mar 2015 15:10:39 +0000 (17:10 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Mon, 30 Mar 2015 15:10:39 +0000 (17:10 +0200)
server/sonar-web/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb

index 9ec1e477893fd07facb39f82ff0a7849592b9478..e3e3729b12ee25d2844f04aaac9751d4443f3644 100644 (file)
@@ -29,6 +29,7 @@ class DashboardController < ApplicationController
     if !@resource || @resource.display_dashboard?
       redirect_if_bad_component()
       load_dashboard()
+      redirect_if_overview()
       load_authorized_widget_definitions()
     else
       if !@resource || !@snapshot
@@ -214,6 +215,12 @@ class DashboardController < ApplicationController
     end
   end
 
+  def redirect_if_overview
+    if @resource && !params[:did]
+      redirect_to :controller => 'overview', :action => 'index', :id => @resource.key
+    end
+  end
+
   def project_not_found
     flash[:error] = message('dashboard.project_not_found')
     redirect_to :action => :index