aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget.html.erb')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget.html.erb34
1 files changed, 20 insertions, 14 deletions
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 e3b9aeaf071..8ec81757294 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
@@ -1,18 +1,24 @@
<div class="<%= definition.getId() %>" style="height:100%;">
-<%
- begin
- widget_body=render :inline => definition.getTarget().getTemplate(), :locals => {:widget_properties => widget.properties_as_hash}
- rescue => error
- logger.error("Can not render widget #{definition.getId()}: " + error)
- logger.error(error.backtrace.join("\n"))
- widget_body=""
- end
+<% if widget.configured %>
+ <%
+ begin
+ widget_body=render :inline => definition.getTarget().getTemplate(), :locals => {:widget_properties => widget.properties_as_hash}
+ rescue => error
+ logger.error("Can not render widget #{definition.getId()}: " + error)
+ logger.error(error.backtrace.join("\n"))
+ widget_body=""
+ end
- if widget_body.include?('<')
-%>
- <%= widget_body %>
-<%
- end
-%>
+ if widget_body.include?('<')
+ %>
+ <%= widget_body %>
+ <%
+ end
+ %>
+<% else %>
+ <div class="widget">
+ <p>Please configure the widget <b><%= definition.getTitle() -%></b>.</p>
+ </div>
+<% end %>
<div style="clear: both;"></div>
</div> \ No newline at end of file