diff options
author | David Gageot <david@gageot.net> | 2012-07-18 12:25:26 +0200 |
---|---|---|
committer | David Gageot <david@gageot.net> | 2012-07-18 12:25:36 +0200 |
commit | 5c1c1319a3e5c30b7f6d7caeaedb9c44ac08737e (patch) | |
tree | 0af2dc1c55f69df674eef07cc4955a11185fb3c2 /sonar-server/src/main/webapp | |
parent | 2fa81a44b5077e6fbdb6fce15c2081c187636463 (diff) | |
download | sonarqube-5c1c1319a3e5c30b7f6d7caeaedb9c44ac08737e.tar.gz sonarqube-5c1c1319a3e5c30b7f6d7caeaedb9c44ac08737e.zip |
SONAR-3671 Delete log "undefined method `column_layout' for nil:NilClass"
Raise a proper NotFound http error instead
Diffstat (limited to 'sonar-server/src/main/webapp')
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb | 8 |
1 files changed, 3 insertions, 5 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 eedcb926c5d..5c02d7a47e1 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 @@ -25,7 +25,6 @@ class DashboardController < ApplicationController before_filter :login_required, :except => [:index] def index - # TODO display error page if no dashboard or no resource load_resource() if !@resource || @resource.display_dashboard? @@ -40,14 +39,11 @@ class DashboardController < ApplicationController end def configure - # TODO display error page if no dashboard or no resource load_resource() load_dashboard() + @category=params[:category] load_widget_definitions(@category) - unless @dashboard - redirect_to home_path - end end def set_layout @@ -175,6 +171,8 @@ class DashboardController < ApplicationController @dashboard=(active ? active.dashboard : nil) end + not_found('dashboard') unless @dashboard + @dashboard_configuration=Api::DashboardConfiguration.new(@dashboard, :period_index => params[:period], :snapshot => @snapshot) if @dashboard && @snapshot end |