From: simonbrandhof Date: Mon, 3 Jan 2011 17:45:21 +0000 (+0000) Subject: do not display the period select-box on treemaps X-Git-Tag: 2.6~198 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=dc12062ab2615a19de17980c290965027b10e9de;p=sonarqube.git do not display the period select-box on treemaps --- 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. <% 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;" %> - <% if params[:show_periods]=='true' %> - - - Period: -
- - - <% end %>