From 42b7491b63b25cdeb3fa208bcf51dfebb4ab20dd Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Tue, 4 Dec 2012 22:50:06 +0100 Subject: [PATCH] SONAR-3825 improve treemap widget --- .../views/measures/_display_treemap.html.erb | 37 ++++++++++++------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/measures/_display_treemap.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/measures/_display_treemap.html.erb index 561d68e3441..8daad3011bb 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/measures/_display_treemap.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/measures/_display_treemap.html.erb @@ -1,22 +1,33 @@ <% - treemap_id = 1 - if defined? widget - treemap_id = widget.id + treemap_id = 1 + if defined? widget + treemap_id = widget.id %> - <%= message('size') -%>: <%= filter.display.size_metric.short_name -%> - <% if filter.display.color_metric %> -    - <%= message('color') -%>: <%= filter.display.color_metric.short_name -%> <%= render :partial => 'treemap/gradient', :locals => {:metric => filter.display.color_metric} %> - <% end %> + + + <% if filter.display.size_metric %> + + <% end %> + <% if filter.display.color_metric %> + + <% end %> + + +
<%= message('size') -%>: <%= filter.display.size_metric.short_name -%> + <%= message('color') -%> + : <%= filter.display.color_metric.short_name -%> <%= render :partial => 'treemap/gradient', :locals => {:metric => filter.display.color_metric} %> + + <%= image_tag 'loading-small.gif', :id => "tm-loading-#{treemap_id}", :style => 'display:none' -%> +
<% else %>
- <%= message('size') -%> -
- <%= metric_select_tag 'tmSize', Metric.all.select { |m| m.treemap_size? }, - :html_id => 'select-tm-size', - :selected_key => filter.display.size_metric.key -%> + <%= message('size') -%> +
+ <%= metric_select_tag 'tmSize', Metric.all.select { |m| m.treemap_size? }, + :html_id => 'select-tm-size', + :selected_key => filter.display.size_metric.key -%>
<%= message('color') -%> -- 2.39.5