]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-37 Do not suggest "new_" metrics
authorFabrice Bellingard <fabrice.bellingard@sonarsource.com>
Thu, 6 Dec 2012 08:57:39 +0000 (09:57 +0100)
committerFabrice Bellingard <fabrice.bellingard@sonarsource.com>
Thu, 6 Dec 2012 08:58:47 +0000 (09:58 +0100)
plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties
sonar-server/src/main/webapp/WEB-INF/app/controllers/comparison_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/views/comparison/index.html.erb

index 126efdf84395957308f71d45b958961f3c021f27..99f714692dbac7ce9a4f9fcce2abcc4b32fb330f 100644 (file)
@@ -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
index a2ee45dbbc9e4e18820f9e6b973df750792ad418..6d95334726f333748ed900388e74c531d5681328 100644 (file)
@@ -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
index 61cc20454fed401ea17185bc617488c0429e0ad1..0fb8461ac906ffe0fe9090b9e779870285bd8335 100644 (file)
             <%= 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') + "'"}
             } -%>
             <script>
               // we don't want this parameter to be submitted, so we set its name to ''