diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2010-12-24 15:37:41 +0000 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2010-12-24 15:37:41 +0000 |
commit | 695e7886256830e95c9545e9f599e1d198a733b4 (patch) | |
tree | bba02db7a585112e75a6c3cfb33717884a63f011 /sonar-server | |
parent | af245798693c9bcc3555abbf407e4c647a37b584 (diff) | |
download | sonarqube-695e7886256830e95c9545e9f599e1d198a733b4.tar.gz sonarqube-695e7886256830e95c9545e9f599e1d198a733b4.zip |
improve labels of diff views
Diffstat (limited to 'sonar-server')
6 files changed, 14 insertions, 13 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb index a62478a85fc..c5f61b8c6c4 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb @@ -475,6 +475,7 @@ module ApplicationHelper # === Optional parameters # * color: true|false. Default is true. # * index: integer between 1 and 5. By default the index is defined by the dashboard variation select-box + # * style: light|normal. Default is normal (parenthesis + bold) # # === Examples # format_variation('ncloc') @@ -505,7 +506,10 @@ module ApplicationHelper end end end - html="<span class='#{css_class}'>(#{formatted_val})</span>" + if options[:style]!='light' + formatted_val="<b>(#{formatted_val})</b>" + end + html="<span class='#{css_class}'>#{formatted_val}</span>" end end html diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/drilldown_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/drilldown_helper.rb index 8cdfaf522e2..fcab616168a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/drilldown_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/drilldown_helper.rb @@ -26,7 +26,7 @@ module DrilldownHelper if mode if mode=='days' - label = "Added over %s previous days" % mode_param + label = "Added over %s days" % mode_param elsif mode=='version' label = "Added since version %s" % mode_param elsif mode=='previous_analysis' diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_header.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_header.html.erb index ce47937e37c..8174a2a8e6d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_header.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_header.html.erb @@ -21,7 +21,7 @@ - <form method="GET" action="<%= url_for :only_path=>true, :overwrite_params => {:period => nil} -%>" style="display: inline"> <select id="select-comparison" name="period" onchange="submit()" class="small"> - <option value="">Variations...</option> + <option value="">Time changes...</option> <%= period_select_options(@snapshot, 1) -%> <%= period_select_options(@snapshot, 2) -%> <%= period_select_options(@snapshot, 3) -%> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/_rule_priority.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/_rule_priority.erb index e9e85333357..aff4f99f88a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/_rule_priority.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/_rule_priority.erb @@ -2,10 +2,10 @@ <td><%= image_tag "priority/#{priority_id}.png" %></td> <td><%= link_to label, {:controller => 'drilldown', :action => 'violations', :id => @project.id, :priority => Sonar::RulePriority.to_s(priority_id), :period => @period_index} %></td> <td style="padding-left: 10px;" align="right"> - <%= @period_index ? format_variation(measure, :index => @period_index) : format_measure(measure) -%> + <%= @period_index ? format_variation(measure, :index => @period_index, :style => 'light') : format_measure(measure) -%> </td> <td align="left"> <% value = measure_or_variation_value(measure) %> - <%= barchart(:width => 60, :percent => (value ? (100 * value / max).to_i : 0), :color => '#777') if max>0 %> + <%= barchart(:width => 60, :percent => (value ? (100 * value / max).to_i : 0), :color => (@period_index ? '#cc0000' : '#777')) if max>0 %> </td> </tr>
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/violations.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/violations.html.erb index c813c23adaf..29fcff2eafa 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/violations.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/violations.html.erb @@ -8,7 +8,7 @@ <% if @snapshot.project_snapshot.periods? %> - <form method="GET" action="<%= url_for :only_path=>true, :overwrite_params => {:period => nil} -%>" style="display: inline"> <select id="select-comparison" name="period" onchange="submit()" class="small"> - <option value="">All violations</option> + <option value="">Time changes...</option> <%= period_select_options(@snapshot, 1) -%> <%= period_select_options(@snapshot, 2) -%> <%= period_select_options(@snapshot, 3) -%> @@ -103,10 +103,10 @@ <%= link_to(rule.name, {:overwrite_params => {:rule => rule.key, :sid => nil, :priority => Sonar::RulePriority.to_s(@priority_id)}}, :title => "#{rule.plugin_name}: #{rule.plugin_rule_key}") %> </td> <td class="right" nowrap="nowrap"> - <span><%= @period_index ? format_variation(rule_measure, :index => @period_index) : rule_measure.formatted_value -%></span> + <span><%= @period_index ? format_variation(rule_measure, :index => @period_index, :style => 'light') : rule_measure.formatted_value -%></span> </td> <td class="left last"> - <%= barchart(:width => 70, :percent => (100 * value / max).to_i, :color => '#777') if max>0 %> + <%= barchart(:width => 70, :percent => (100 * value / max).to_i, :color => (@period_index ? '#cc0000' : '#777')) if max>0 %> <!--[if IE]> <![endif]--> </td> </tr> @@ -159,7 +159,7 @@ <% end %> </td> <td class="right last" nowrap> - <%= @period_index ? format_variation(measure, :index => @period_index) : measure.formatted_value -%> + <%= @period_index ? format_variation(measure, :index => @period_index, :style => 'light') : measure.formatted_value -%> <!--[if IE]> <![endif]--> </td> </tr> diff --git a/sonar-server/src/main/webapp/stylesheets/style.css b/sonar-server/src/main/webapp/stylesheets/style.css index 2be561e7ec2..765e060731b 100644 --- a/sonar-server/src/main/webapp/stylesheets/style.css +++ b/sonar-server/src/main/webapp/stylesheets/style.css @@ -888,15 +888,12 @@ ul.operations li a { /* ------------------- VARIATIONS ------------------- */ .var { - font-weight: bold; color: #444 !important; } .varb {/* better */ - font-weight: bold; - color: #078C00 !important; + color: #078C00 !important; } .varw {/* worst */ - font-weight: bold; color: #cc0000 !important; } |