aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2014-06-18 17:08:30 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2014-06-19 20:12:12 +0200
commit9bfb3bb8b4775294831f38f7ae7aea35416d680b (patch)
tree13b20ce874b87d5c1dc7a2f715244ee0ea603bc0 /plugins
parent6fbd7d0754de53986bc1d37ae7fd29c8e32872a1 (diff)
downloadsonarqube-9bfb3bb8b4775294831f38f7ae7aea35416d680b.tar.gz
sonarqube-9bfb3bb8b4775294831f38f7ae7aea35416d680b.zip
SONAR-5007 add single unique key to quality profiles. Replace DB ID.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/description.html.erb7
-rw-r--r--plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/TendencyDecoratorTest.java6
2 files changed, 6 insertions, 7 deletions
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 @@
<span class="description-widget-key"><%= h @project.key -%></span>
<% if @project.description.present? %>
- <p class="description-widget-description"><%= h @project.description %></p>
+ <p class="description-widget-description"><%= h @project.description -%></p>
<% end %>
<%
@@ -19,11 +19,10 @@
<% qprofiles.each_with_index do |profile, i| %>
<span class="nowrap">
<span id="resource_profile">
- <%= 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' -%>
</span>
<span class="subtitle">
- (<%= Api::Utils.language_name(profile['language']) -%>,
- <%= message('widget.description.profile_version_x', :params => profile['version']) -%>)
+ (<%= Api::Utils.language_name(profile['language']) -%>)
</span>
<% if i < (qprofiles.size - 1) %>,<% end %>
</span>
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.<Metric>asList(CoreMetrics.LINES, CoreMetrics.COVERAGE, CoreMetrics.COVERAGE_LINE_HITS_DATA, CoreMetrics.PROFILE));
+ when(metricFinder.findAll()).thenReturn(Arrays.<Metric>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.<Object[]>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);