diff options
Diffstat (limited to 'server/sonar-web/src/main')
-rw-r--r-- | server/sonar-web/src/main/webapp/WEB-INF/app/controllers/widget_controller.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/widget_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/widget_controller.rb index 2a9ad511394..c40d8764c50 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/widget_controller.rb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/widget_controller.rb @@ -29,6 +29,20 @@ class WidgetController < ApplicationController render :action => 'index' end + def show + load_resource + load_widget + begin + render :inline => @widget_definition.getTarget().getTemplate(), :locals => { + :widget_properties => @widget.properties_as_hash, :widget => @widget, :dashboard_configuration => @dashboard_configuration + } + rescue => error + logger.error(message('dashboard.cannot_render_widget_x', :params => [@widget_definition.getId(), error]), error) + render :status => 500 + end + + end + private def load_resource |