From fb65c44792a63bf0ee8fc0d68b8d035d79998306 Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Wed, 31 Aug 2011 11:08:38 +0200 Subject: [PATCH] SONAR-2074 Fix bug that occurs when several snapshots on the same day --- .../plugins/core/widgets/timeline.html.erb | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 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 88c1d07cdb5..5bdb2b17c57 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 @@ -45,6 +45,12 @@ js_data += (m_date.month - 1).to_s js_data += "," js_data += m_date.day.to_s + js_data += "," + js_data += m_date.hour.to_s + js_data += "," + js_data += m_date.min.to_s + js_data += "," + js_data += m_date.sec.to_s js_data += "),\"y\":" js_data += sprintf( "%0.02f", metric_data[:value]) js_data += "}," @@ -53,7 +59,7 @@ js_snapshots += "{\"sid\":" js_snapshots += metric_data[:sid] js_snapshots += ",\"d\":\"" - js_snapshots += human_short_date(m_date) + js_snapshots += l m_date, :format => :long js_snapshots += "\"}," end end @@ -85,12 +91,18 @@ js_events += (e_date.month - 1).to_s js_events += "," js_events += e_date.day.to_s + js_events += "," + js_events += e_date.hour.to_s + js_events += "," + js_events += e_date.min.to_s + js_events += "," + js_events += e_date.sec.to_s js_events += "),\"l\":[" e_details.each() do |e| js_events += "{\"n\":\"" js_events += e.name js_events += "\",\"ld\":\"" - js_events += human_short_date(e_date) + js_events += l e_date, :format => :long js_events += "\"}," end js_events += "]}," @@ -118,8 +130,8 @@