diff options
author | Fabrice Bellingard <bellingard@gmail.com> | 2011-08-24 15:22:41 +0200 |
---|---|---|
committer | Fabrice Bellingard <bellingard@gmail.com> | 2011-08-24 15:22:41 +0200 |
commit | 88195bbe5d8864fbb3ddd6d62718206075be6f4b (patch) | |
tree | 77c3ebc2687b7f964810767ec64ba96816e73a33 | |
parent | 89391aba6ca7a49a24fd402f92d5875d51138397 (diff) | |
download | sonarqube-88195bbe5d8864fbb3ddd6d62718206075be6f4b.tar.gz sonarqube-88195bbe5d8864fbb3ddd6d62718206075be6f4b.zip |
SONAR-2074 Fix wrong path to Ruby template
+ rename "widgetHeight" into "chartHeight"
2 files changed, 6 insertions, 6 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/TimelineWidget.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/TimelineWidget.java index 0569f5ff6d5..7483f0018cc 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/TimelineWidget.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/TimelineWidget.java @@ -28,11 +28,11 @@ import org.sonar.api.web.WidgetPropertyType; @WidgetProperties( { @WidgetProperty(key = "chartTitle", type = WidgetPropertyType.STRING), - @WidgetProperty(key = "metric1", type = WidgetPropertyType.METRIC), + @WidgetProperty(key = "metric1", type = WidgetPropertyType.METRIC, defaultValue = "ncloc"), @WidgetProperty(key = "metric2", type = WidgetPropertyType.METRIC), @WidgetProperty(key = "metric3", type = WidgetPropertyType.METRIC), @WidgetProperty(key = "displayEvents", type = WidgetPropertyType.BOOLEAN), - @WidgetProperty(key = "widgetHeight", type = WidgetPropertyType.INTEGER) + @WidgetProperty(key = "chartHeight", type = WidgetPropertyType.INTEGER) } ) public class TimelineWidget extends AbstractRubyTemplate implements RubyRailsWidget { @@ -46,7 +46,7 @@ public class TimelineWidget extends AbstractRubyTemplate implements RubyRailsWid @Override protected String getTemplatePath() { - //return "/org/sonar/plugins/core/widgets/timeline.html.erb"; - return "/Users/fbellingard/Documents/Sonar/repos/sonar/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/timeline.html.erb"; + return "/org/sonar/plugins/core/widgets/timeline.html.erb"; + //return "/Users/fbellingard/Documents/Sonar/repos/sonar/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/timeline.html.erb"; } }
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/timeline.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/timeline.html.erb index 0979c233583..274eeda8f2e 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/timeline.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/timeline.html.erb @@ -94,7 +94,7 @@ js_translations += "}" # Check if the widget height was specified - widgetHeight = widget_properties["widgetHeight"].to_i == 0 ? "null" : widget_properties["widgetHeight"] + chartHeight = widget_properties["chartHeight"].to_i == 0 ? "null" : widget_properties["chartHeight"] %> <% if widget_properties["chartTitle"] %> @@ -119,7 +119,7 @@ var translations = <%= js_translations -%>; var events = <%= js_events ? js_events : "null" -%>; var timeline = new SonarWidgets.Timeline('timeline-chart-<%= widget.id -%>') - .height(<%= widgetHeight -%>) + .height(<%= chartHeight -%>) .data(data) .snapshots(snapshots) .metrics(metrics) |