From 9bfb3bb8b4775294831f38f7ae7aea35416d680b Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Wed, 18 Jun 2014 17:08:30 +0200 Subject: SONAR-5007 add single unique key to quality profiles. Replace DB ID. --- .../resources/org/sonar/plugins/core/widgets/description.html.erb | 7 +++---- .../org/sonar/plugins/core/timemachine/TendencyDecoratorTest.java | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'plugins') diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/description.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/description.html.erb index 8f4b9c7fd57..646b9e08a92 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/description.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/description.html.erb @@ -6,7 +6,7 @@ <%= h @project.key -%> <% if @project.description.present? %> -

<%= h @project.description %>

+

<%= h @project.description -%>

<% end %> <% @@ -19,11 +19,10 @@ <% qprofiles.each_with_index do |profile, i| %> - <%= link_to profile['name'], {:controller => '/profiles', :action => 'show', :id => profile['id']}, :class => 'widget-link', :id => profile['language'] + '_profile_link' -%> + <%= link_to profile['name'], {:controller => 'profiles', :action => 'show', :key => profile['key']}, :class => 'widget-link', :id => profile['language'] + '_profile_link' -%> - (<%= Api::Utils.language_name(profile['language']) -%>, - <%= message('widget.description.profile_version_x', :params => profile['version']) -%>) + (<%= Api::Utils.language_name(profile['language']) -%>) <% if i < (qprofiles.size - 1) %>,<% end %> diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/TendencyDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/TendencyDecoratorTest.java index 4240fa71bd7..7a2c47d57a1 100644 --- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/TendencyDecoratorTest.java +++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/TendencyDecoratorTest.java @@ -52,7 +52,7 @@ public class TendencyDecoratorTest { when(project.getAnalysisDate()).thenReturn(date("2009-12-25")); MetricFinder metricFinder = mock(MetricFinder.class); - when(metricFinder.findAll()).thenReturn(Arrays.asList(CoreMetrics.LINES, CoreMetrics.COVERAGE, CoreMetrics.COVERAGE_LINE_HITS_DATA, CoreMetrics.PROFILE)); + when(metricFinder.findAll()).thenReturn(Arrays.asList(CoreMetrics.LINES, CoreMetrics.COVERAGE, CoreMetrics.COVERAGE_LINE_HITS_DATA)); TendencyDecorator decorator = new TendencyDecorator(null, metricFinder); @@ -75,7 +75,7 @@ public class TendencyDecoratorTest { new Object[] {date("2009-12-02"), CoreMetrics.LINES, 1300.0}, new Object[] {date("2009-12-02"), CoreMetrics.COVERAGE, 79.6}, new Object[] {date("2009-12-15"), CoreMetrics.LINES, 1150.0} - )); + )); DecoratorContext context = mock(DecoratorContext.class); when(context.getMeasure(CoreMetrics.LINES)).thenReturn(new Measure(CoreMetrics.LINES, 1400.0)); @@ -97,7 +97,7 @@ public class TendencyDecoratorTest { when(timeMachine.getMeasuresFields(query)).thenReturn(Arrays.asList( new Object[] {date("2009-12-01"), CoreMetrics.LINES, 1200.0}, new Object[] {date("2009-12-02"), CoreMetrics.LINES, 1300.0} - )); + )); DecoratorContext context = mock(DecoratorContext.class); TendencyDecorator decorator = new TendencyDecorator(timeMachine, query, analyser); -- cgit v1.2.3