diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2015-02-09 16:46:19 +0100 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2015-02-09 16:47:18 +0100 |
commit | eb1c4e9fd43cdf253b9eefa75755a7bebd0347c2 (patch) | |
tree | 3e870b5eeb8027a6b21f65946eab2fcf54cfcb01 /plugins | |
parent | 27353b982fc020e83140326ddc6c6c99fe89dc7c (diff) | |
download | sonarqube-eb1c4e9fd43cdf253b9eefa75755a7bebd0347c2.tar.gz sonarqube-eb1c4e9fd43cdf253b9eefa75755a7bebd0347c2.zip |
SONAR-5183 - timezones - fix timemachine widget on oracle
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/timeline.html.erb | 6 |
1 files changed, 3 insertions, 3 deletions
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 200a48fd8a7..18c5d7785a2 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 @@ -38,7 +38,7 @@ else metric_count_per_snapshot_id[sid] = 1 end - metric_data_map[trend_item["metric_id"].to_i] << {:date => trend_item["created_at"], :value => trend_item["value"], :sid => trend_item["sid"]} + metric_data_map[trend_item["metric_id"].to_i] << {:date => Time.at(trend_item["created_at"].to_i/1000), :value => trend_item["value"], :sid => trend_item["sid"]} end # Create JS structures to print out in the HTML page @@ -53,7 +53,7 @@ metric_data_map[metric_id].each() do |metric_data| # for every metric value, we need to check that the corresponding snapshot has values for each metric if metric_count_per_snapshot_id[metric_data[:sid]]==total_number_of_metrics - m_date = Time.at(metric_data[:date]/1000) + m_date = metric_data[:date] m_value = sprintf("%0.02f", metric_data[:value]) m_value_localized = ProjectMeasure.new(:metric => metric_map[metric_id]).format_numeric_value(metric_data[:value], {}) js_data += "{x:d(" @@ -97,7 +97,7 @@ unless from_date # find the oldest date metric_data_map.values.each() do |metric_data_array| - first_date = Time.at(metric_data_array[0][:date]/1000) + first_date = metric_data_array[0][:date] from_date = first_date if !from_date || from_date > first_date end end |