aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorFabrice Bellingard <bellingard@gmail.com>2011-10-17 15:58:01 +0200
committerFabrice Bellingard <bellingard@gmail.com>2011-10-17 15:58:01 +0200
commitc233b56bf4ed5f9a2ed257288e725187118eaf7d (patch)
tree7ced63443711a3ace9120a721261942dde2b2171 /plugins
parentb7edfd1d01532f396fd37c9d5990b15a875a81f0 (diff)
downloadsonarqube-c233b56bf4ed5f9a2ed257288e725187118eaf7d.tar.gz
sonarqube-c233b56bf4ed5f9a2ed257288e725187118eaf7d.zip
SONAR-2913 Don't display sparkline if only 1 snapshot
In the History table, if there's only 1 snapshot, the sparkline cannot be displayed.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/time_machine.html.erb4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/time_machine.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/time_machine.html.erb
index b8d8bcce8a8..5d40ece6987 100644
--- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/time_machine.html.erb
+++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/time_machine.html.erb
@@ -13,7 +13,6 @@
metric_ids << ncloc.id
end
numberOfColumns = widget_properties["numberOfColumns"].to_i == 0 ? 4 : widget_properties["numberOfColumns"].to_i
- displaySparkLine = widget_properties["displaySparkLine"]
# Retrieve the measures for each metric on each snapshot
options = {}
@@ -55,6 +54,9 @@
rows<<row
end
end
+
+ # Should display the sparkline?
+ displaySparkLine = widget_properties["displaySparkLine"] if snapshot_by_id.size > 1
%>
<div class="widget-matrix">