aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/webapp
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-11-09 14:53:23 +0100
committerStas Vilchik <vilchiks@gmail.com>2015-11-09 14:53:23 +0100
commitf6ea19ed5a82aab38aa68580d97e60b879bd439b (patch)
treeb7d448fec44218126d604ab4c6156c8641e2d622 /server/sonar-web/src/main/webapp
parent006df5cc57a7b2d3df956557f3e4a1b4488d5322 (diff)
downloadsonarqube-f6ea19ed5a82aab38aa68580d97e60b879bd439b.tar.gz
sonarqube-f6ea19ed5a82aab38aa68580d97e60b879bd439b.zip
SONAR-6331 fix project overview redirection
Diffstat (limited to 'server/sonar-web/src/main/webapp')
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb19
1 files changed, 14 insertions, 5 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb
index fbe46141759..87f15af4a01 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb
@@ -25,13 +25,22 @@ class DashboardController < ApplicationController
before_filter :login_required, :except => [:index]
def index
- if params[:id] && !params[:did] && !params[:name]
- return redirect_to(url_for({:controller => 'overview'}) + '?id=' + url_encode(params[:id]))
- end
-
load_resource()
if !@resource || @resource.display_dashboard?
- redirect_if_bad_component()
+ if params[:id]
+ unless @resource
+ return project_not_found
+ end
+ unless @snapshot
+ return project_not_analyzed
+ end
+ end
+
+ # redirect to the project overview
+ if params[:id] && !params[:did] && !params[:name]
+ return redirect_to(url_for({:controller => 'overview'}) + '?id=' + url_encode(params[:id]))
+ end
+
load_dashboard()
load_authorized_widget_definitions()
else