From ad2e6380f4384ea7864d05365364578e12dfd629 Mon Sep 17 00:00:00 2001 From: Maciej Bodek Date: Fri, 13 Dec 2024 23:27:48 +0100 Subject: [PATCH] auto unit fixes --- packages/web-console/src/scenes/Editor/Metrics/index.tsx | 3 +++ packages/web-console/src/scenes/Schema/index.tsx | 2 ++ 2 files changed, 5 insertions(+) diff --git a/packages/web-console/src/scenes/Editor/Metrics/index.tsx b/packages/web-console/src/scenes/Editor/Metrics/index.tsx index bddc54e56..20ba3a3d3 100644 --- a/packages/web-console/src/scenes/Editor/Metrics/index.tsx +++ b/packages/web-console/src/scenes/Editor/Metrics/index.tsx @@ -287,6 +287,9 @@ export const Metrics = () => { }) if (metricDuration) { metricDurationRef.current = metricDuration + if (refreshRate === RefreshRate.AUTO) { + setupListeners() + } } if (metricDuration && refreshRate && metricViewMode && sampleBy) { updateBuffer(buffer.id, merged) diff --git a/packages/web-console/src/scenes/Schema/index.tsx b/packages/web-console/src/scenes/Schema/index.tsx index 30026010e..8d158ca57 100644 --- a/packages/web-console/src/scenes/Schema/index.tsx +++ b/packages/web-console/src/scenes/Schema/index.tsx @@ -75,6 +75,7 @@ import { MetricDuration, MetricViewMode, RefreshRate, + SampleBy, } from "../../scenes/Editor/Metrics/utils" type Props = Readonly<{ @@ -283,6 +284,7 @@ const Schema = ({ metricDuration: MetricDuration.ONE_HOUR, refreshRate: RefreshRate.AUTO, viewMode: MetricViewMode.GRID, + sampleBy: SampleBy.AUTO, }, }) }