From 3d333b6bfd8a75bdb03e72ef761d451500315247 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Thu, 15 May 2014 13:57:25 +0200 Subject: SONAR-5130 Revert improve ui of the size widget --- .../org/sonar/plugins/core/widgets/size.html.erb | 37 +++++++++++----------- 1 file changed, 19 insertions(+), 18 deletions(-) (limited to 'plugins') diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb index 97efc27572e..bc8a1f3930d 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb @@ -26,7 +26,6 @@

<% if ncloc_language_dist_hash %> <% if ncloc_language_dist_hash.size > 1 %> -
<% max = ncloc_language_dist_hash.max_by{|_k,v| v.to_i}[1].to_i @@ -35,26 +34,28 @@ languages_by_key = Hash[languages.collect { |l| [l.getKey(), l.getName] }] ncloc_language_dist_hash.sort {|v1,v2| (languages_by_key[v1[0]] ? languages_by_key[v1[0]].to_s : v1[0]) <=> (languages_by_key[v2[0]] ? languages_by_key[v2[0]].to_s : v2[0]) }.each do |language_key, language_ncloc| %> - - - - + + + + + + <% end %>
- <% language = languages.find { |l| l.getKey()==language_key.to_s } -%> - <%= language ? language.getName() : language_key -%> - - <%= barchart(:width => 70, :percent => (100 * language_ncloc.to_i / max).to_i, :value => ncloc.format_numeric_value(language_ncloc), :color => '#1f77b4')%> -
+ <% language = languages.find { |l| l.getKey()==language_key.to_s } -%> + <%= language ? language.getName() : language_key -%> + + <%= ncloc.format_numeric_value(language_ncloc) %> +   + <%= barchart(:width => 70, :percent => (100 * language_ncloc.to_i / max).to_i)%> +
- <% else %> - <% - language_key = ncloc_language_dist_hash.first[0] - language = languages.find { |l| l.getKey()==language_key.to_s } -%> - <%= language ? language.getName() : language_key -%> + <% else %> + <% + language_key = ncloc_language_dist_hash.first[0] + language = languages.find { |l| l.getKey()==language_key.to_s } -%> + <%= language ? language.getName() : language_key -%> + <% end %> <% end %> -
- <% end %> - <% else %>

<%= message('widget.size.lines') -%>

<%= format_measure(lines, :suffix => '', :url => url_for_drilldown(lines)) -%> <%= trend_icon(lines) -%>

-- cgit v1.2.3