From 78fc282051e03a5d049100d807b4e86438cf3e4e Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 20 Oct 2015 13:55:49 +0200 Subject: [PATCH] Fixed realtime range check. --- app/controllers/reports_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb index 2ae053ef0..612f991fa 100644 --- a/app/controllers/reports_controller.rb +++ b/app/controllers/reports_controller.rb @@ -117,7 +117,8 @@ class ReportsController < ApplicationController match = false result['aggregations']['time_buckets']['buckets'].each {|item| if interval == 'minute' - start_string = start.iso8601.sub(/:\d\d.+?$/, '') + item['key_as_string'] = item['key_as_string'].sub(/:\d\d.\d\d\dZ$/, '') + start_string = start.iso8601.sub(/:\d\dZ$/, '') else start_string = start.iso8601.sub(/:\d\d:\d\d.+?$/, '') end