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 not, Protovis won't be able to display)
if metric_count_per_snapshot_id[metric_data[:sid]]==total_number_of_metrics
- m_date = Time.parse(metric_data[:date])
+ m_date = metric_data[:date]
+ # Only Oracle returns a Time object, so let's parse this string if it's not a Time instance
+ m_date = Time.parse(metric_data[:date]) unless m_date.is_a? Time
js_data += "{x:d("
js_data += m_date.year.to_s
js_data += ","
unless from_date
# find the oldest date
metric_data_map.values.each() do |metric_data_array|
- first_date = Time.parse(metric_data_array[0][:date])
+ first_date = metric_data_array[0][:date]
+ # Only Oracle returns a Time object, so let's parse this string if it's not a Time instance
+ first_date = Time.parse(metric_data_array[0][:date]) unless first_date.is_a? Time
from_date = first_date if !from_date || from_date > first_date
end
end