aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2011-07-22 16:15:29 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2011-07-22 16:15:29 +0200
commitf6e1fda65d212e35a99fdfa0c3d3e1b7b6061cd6 (patch)
treeeb6d2942ccb440a2987ab582a52dc1c39a2f3391 /plugins
parentbfac36464819bb75a274feb522e5850706a4d287 (diff)
downloadsonarqube-f6e1fda65d212e35a99fdfa0c3d3e1b7b6061cd6.tar.gz
sonarqube-f6e1fda65d212e35a99fdfa0c3d3e1b7b6061cd6.zip
SONAR-2635 Add new type of widget property : METRIC
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CustomMeasuresWidget.java20
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/custom_measures.html.erb2
2 files changed, 11 insertions, 11 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CustomMeasuresWidget.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CustomMeasuresWidget.java
index 20be067423e..6410d64e60b 100644
--- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CustomMeasuresWidget.java
+++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CustomMeasuresWidget.java
@@ -24,16 +24,16 @@ import org.sonar.api.web.*;
@WidgetCategory({"Measures"})
@WidgetProperties(
{
- @WidgetProperty(key = "metric1", type = WidgetPropertyType.STRING, description = "Key as defined in <a href='http://docs.codehaus.org/display/SONAR/Metric+definitions'>this list</a>"),
- @WidgetProperty(key = "metric2", type = WidgetPropertyType.STRING),
- @WidgetProperty(key = "metric3", type = WidgetPropertyType.STRING),
- @WidgetProperty(key = "metric4", type = WidgetPropertyType.STRING),
- @WidgetProperty(key = "metric5", type = WidgetPropertyType.STRING),
- @WidgetProperty(key = "metric6", type = WidgetPropertyType.STRING),
- @WidgetProperty(key = "metric7", type = WidgetPropertyType.STRING),
- @WidgetProperty(key = "metric8", type = WidgetPropertyType.STRING),
- @WidgetProperty(key = "metric9", type = WidgetPropertyType.STRING),
- @WidgetProperty(key = "metric10", type = WidgetPropertyType.STRING)
+ @WidgetProperty(key = "metric1", type = WidgetPropertyType.METRIC),
+ @WidgetProperty(key = "metric2", type = WidgetPropertyType.METRIC),
+ @WidgetProperty(key = "metric3", type = WidgetPropertyType.METRIC),
+ @WidgetProperty(key = "metric4", type = WidgetPropertyType.METRIC),
+ @WidgetProperty(key = "metric5", type = WidgetPropertyType.METRIC),
+ @WidgetProperty(key = "metric6", type = WidgetPropertyType.METRIC),
+ @WidgetProperty(key = "metric7", type = WidgetPropertyType.METRIC),
+ @WidgetProperty(key = "metric8", type = WidgetPropertyType.METRIC),
+ @WidgetProperty(key = "metric9", type = WidgetPropertyType.METRIC),
+ @WidgetProperty(key = "metric10", type = WidgetPropertyType.METRIC)
}
)
public class CustomMeasuresWidget extends AbstractRubyTemplate implements RubyRailsWidget {
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/custom_measures.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/custom_measures.html.erb
index 8d7422760ac..bc6c5d5b94e 100644
--- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/custom_measures.html.erb
+++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/custom_measures.html.erb
@@ -6,7 +6,7 @@
if m
%>
<div class="dashbox">
- <p class="title"><%= m.metric.short_name -%></p>
+ <p class="title"><%= metric.short_name -%></p>
<p>
<span class="big"><%= format_measure(m, :url => url_for_drilldown(m)) -%></span>
<%= dashboard_configuration.selected_period? ? format_variation(m) : trend_icon(m) -%>