diff options
author | Fabrice Bellingard <bellingard@gmail.com> | 2011-10-17 15:23:58 +0200 |
---|---|---|
committer | Fabrice Bellingard <bellingard@gmail.com> | 2011-10-17 15:25:30 +0200 |
commit | b7edfd1d01532f396fd37c9d5990b15a875a81f0 (patch) | |
tree | b6ee5a0bc8f052a2b1419536df57af7f964e38df /plugins/sonar-core-plugin | |
parent | f19f49455831b7c5912ee81d2143e7ab74c00729 (diff) | |
download | sonarqube-b7edfd1d01532f396fd37c9d5990b15a875a81f0.tar.gz sonarqube-b7edfd1d01532f396fd37c9d5990b15a875a81f0.zip |
SONAR-1928 Fix problem with metric order
Diffstat (limited to 'plugins/sonar-core-plugin')
-rw-r--r-- | plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspot_metric.html.erb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspot_metric.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspot_metric.html.erb index 3d9ac5d1459..86cc3f88821 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspot_metric.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspot_metric.html.erb @@ -27,7 +27,7 @@ :conditions => [snapshots_conditions.join(' AND '), snapshots_values], :include => ['project', 'measures'], :order => "project_measures.value #{'DESC' if metric.direction<0}", - :limit => limit) + :limit => limit) end %> @@ -48,7 +48,11 @@ <thead><tr><th colspan="3"/></tr></thead> <tbody> <% - metric_max_value = snapshots.first.measure(metric).value + if metric.direction > 0 + metric_max_value = snapshots.last.measure(metric).value + else + metric_max_value = snapshots.first.measure(metric).value + end snapshots.each do |s| measure = s.measure(metric) resource = s.resource |