diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2011-01-03 17:45:21 +0000 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2011-01-03 17:45:21 +0000 |
commit | dc12062ab2615a19de17980c290965027b10e9de (patch) | |
tree | 1f84eb7988d7903f3c1da52e9416ebaf5fb93b89 /sonar-server | |
parent | bd7a95e4bf2489c64202694333f71fe989a246f9 (diff) | |
download | sonarqube-dc12062ab2615a19de17980c290965027b10e9de.tar.gz sonarqube-dc12062ab2615a19de17980c290965027b10e9de.zip |
do not display the period select-box on treemaps
Diffstat (limited to 'sonar-server')
3 files changed, 8 insertions, 20 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 8bcaabd132b..a3a982e0163 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 @@ -79,17 +79,18 @@ module ApplicationHelper return nil if snapshot.nil? || snapshot.project_snapshot.nil? mode=snapshot.project_snapshot.send "period#{period_index}_mode" mode_param=snapshot.project_snapshot.send "period#{period_index}_param" + date=snapshot.project_snapshot.send "period#{period_index}_date" label=nil if mode if mode=='days' label = "over %s days" % mode_param elsif mode=='version' - label = "since version %s" % mode_param + label = "since version %s (%s)" % [mode_param, l(date)] elsif mode=='previous_analysis' - label = "since previous analysis (%s)" % localize(Date.parse(mode_param)) + label = "since previous analysis (%s)" % l(date) elsif mode=='date' - label = "since #{localize(Date.parse(mode_param))}" + label = "since #{localize(date)}" end end label diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/filters/_treemap.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/filters/_treemap.html.erb index 6feef866da6..f927de3ecb4 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/filters/_treemap.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/filters/_treemap.html.erb @@ -14,13 +14,13 @@ Treemap does not support yet the selection of a period. <script> var treemap_width = $('treemap').getDimensions().width - 15; var treemap_height = document.viewport.getDimensions().height - 220; - function load_treemap(size_metric, color_metric, hide_form, period_index) { + function load_treemap(size_metric, color_metric, hide_form) { $('treemap_loading').show(); $('treemap').hide(); - <%= remote_function :update => 'treemap', :url => {:action => 'treemap', :id => @filter.id, :show_periods => true}, + <%= remote_function :update => 'treemap', :url => {:action => 'treemap', :id => @filter.id}, :complete => "$('treemap_loading').hide();$('treemap').show();", - :with => "'width=' + treemap_width + '&height=' + treemap_height + '&size_metric=' + size_metric + '&color_metric=' + color_metric + '&hide_form=' + hide_form + '&period=' + period_index" %> + :with => "'width=' + treemap_width + '&height=' + treemap_height + '&size_metric=' + size_metric + '&color_metric=' + color_metric + '&hide_form=' + hide_form" %> } - load_treemap('<%= size_metric.key -%>', '<%= color_metric.key -%>', <%= edit_mode -%>, <%= params[:period].to_i -%>); + load_treemap('<%= size_metric.key -%>', '<%= color_metric.key -%>', <%= edit_mode -%>); </script> <% end %>
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/filters/treemap.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/filters/treemap.html.erb index 5c881d2f96e..dbe6685989b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/filters/treemap.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/filters/treemap.html.erb @@ -14,19 +14,6 @@ <%= select_tag 'color_metric', options_grouped_by_domain(Sonar::TreemapBuilder.color_metrics, @color_metric.key), :id => 'color_metric', :class => 'small', :onchange => "load_treemap(this.form.size_metric.value,this.form.color_metric.value, false);return false;" %> </td> - <% if params[:show_periods]=='true' %> - <td class="sep"> </td> - <td> - <span class="comments">Period:</span> - <br/> - <select name="period" onchange="submit()" class="small"> - <option value="">None</option> - <% period_names.each_with_index do |name, index| %> - <option value="<%= index+1 -%>" <%= 'selected' if params[:period].to_i==index+1 -%>><%= name -%></value> - <% end %> - </select> - </td> - <% end %> </tr> </table> </form> |