diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2010-11-03 13:30:36 +0000 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2010-11-03 13:30:36 +0000 |
commit | 3faab136004d195fa89c4c32313200aae0a4c68a (patch) | |
tree | 9b0a1c452641d496b462457c46b98829dd2cd1fa | |
parent | aea2dd3880d8b59e29416cb9bab5ae76532fe9f5 (diff) | |
download | sonarqube-3faab136004d195fa89c4c32313200aae0a4c68a.tar.gz sonarqube-3faab136004d195fa89c4c32313200aae0a4c68a.zip |
SONAR-1643 add parameters widget and dashboard to widget templates
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_configure_widget.html.erb | 2 | ||||
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget.html.erb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_configure_widget.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_configure_widget.html.erb index 94f8cbc6375..d592eceb471 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_configure_widget.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_configure_widget.html.erb @@ -1,6 +1,6 @@ <% begin - widget_body=render :inline => definition.getTarget().getTemplate(), :locals => {:widget_properties => widget.properties_as_hash} + widget_body=render :inline => definition.getTarget().getTemplate(), :locals => {:widget_properties => widget.properties_as_hash, :widget => widget, :dashboard => @dashboard} rescue => error logger.error("Can not render widget #{definition.getId()}: " + error) logger.error(error.backtrace.join("\n")) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget.html.erb index 592313173f9..e6ff5c55943 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget.html.erb @@ -2,7 +2,7 @@ <% if widget.configured %> <% begin - widget_body=render :inline => definition.getTarget().getTemplate(), :locals => {:widget_properties => widget.properties_as_hash} + widget_body=render :inline => definition.getTarget().getTemplate(), :locals => {:widget_properties => widget.properties_as_hash, :widget => widget, :dashboard => @dashboard} rescue => error logger.error("Can not render widget #{definition.getId()}: " + error) logger.error(error.backtrace.join("\n")) |