From 72da99e6be0998b7c4e5ef889ebba7e1893aca72 Mon Sep 17 00:00:00 2001 From: andersonid Date: Fri, 3 Oct 2025 10:20:37 -0300 Subject: [PATCH] Fix: convert Prometheus timestamps from seconds to milliseconds for Victory.js --- app/services/historical_analysis.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/historical_analysis.py b/app/services/historical_analysis.py index daaa6a4..49fe12c 100644 --- a/app/services/historical_analysis.py +++ b/app/services/historical_analysis.py @@ -1372,7 +1372,7 @@ class HistoricalAnalysisService: chart_data = [] for point in data: if len(point) >= 2 and point[1] != 'NaN': - timestamp = int(point[0]) # Already in milliseconds + timestamp = int(point[0] * 1000) # Convert seconds to milliseconds value = self._safe_float(point[1]) chart_data.append({ "x": timestamp, @@ -1423,7 +1423,7 @@ class HistoricalAnalysisService: chart_data = [] for point in data: if len(point) >= 2 and point[1] != 'NaN': - timestamp = int(point[0]) # Already in milliseconds + timestamp = int(point[0] * 1000) # Convert seconds to milliseconds value = self._safe_float(point[1]) / (1024 * 1024) # Convert to MB chart_data.append({ "x": timestamp,