From 87c2514ac89b6447affc97350a10b44270d73272 Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Thu, 6 Dec 2012 09:57:39 +0100 Subject: [PATCH] SONAR-37 Do not suggest "new_" metrics --- .../src/main/resources/org/sonar/l10n/core.properties | 2 +- .../webapp/WEB-INF/app/controllers/comparison_controller.rb | 2 +- .../src/main/webapp/WEB-INF/app/views/comparison/index.html.erb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties index 126efdf8439..99f714692db 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties @@ -511,7 +511,7 @@ all-projects.cols.key=Key comparison.compare=Compare comparison.add_metric=Add metric -comparison.select_resource_to_compare=Select a resource +comparison.add_project=Add project comparison.select_version=Select a version comparison.remove_resource=Remove resource comparison.remove_metric=Remove metric diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/comparison_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/comparison_controller.rb index a2ee45dbbc9..6d95334726f 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/comparison_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/comparison_controller.rb @@ -57,7 +57,7 @@ class ComparisonController < ApplicationController end @metrics = Metric.by_keys(metrics) - @metric_to_choose = Metric.all.select {|m| m.display? && !@metrics.include?(m)}.sort_by(&:short_name) + @metric_to_choose = Metric.all.select {|m| m.display? && !m.on_new_code? && !@metrics.include?(m)}.sort_by(&:short_name) end def versions diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/comparison/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/comparison/index.html.erb index 61cc20454fe..0fb8461ac90 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/comparison/index.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/comparison/index.html.erb @@ -138,7 +138,7 @@ <%= resource_select_tag 'new_resource', { :resource_type_property => 'comparable', :width => '250px', - :select2_options => {'placeholder' => "'" + message('comparison.select_resource_to_compare') + "'"} + :select2_options => {'placeholder' => "'" + message('comparison.add_project') + "'"} } -%>