From e7d4d0f104710534c9155cc965204474587af8ef Mon Sep 17 00:00:00 2001 From: Iris Ye Date: Tue, 4 Aug 2026 10:18:04 -0400 Subject: [PATCH 1/4] [FEATURE] Allow admins to centrally disable dashboard auto-refresh via server config (default false) Signed-off-by: Iris Ye --- .../RefreshIntervalPicker.tsx | 4 ++- .../DashboardProvider/use-save-dashboard.ts | 7 ++-- .../TimeRangeControls.test.tsx | 19 ++++++++--- .../TimeRangeControls/TimeRangeControls.tsx | 31 ++++++++++++----- .../src/constants/user-interface-text.ts | 1 + .../TimeRangeProvider/TimeRangeProvider.tsx | 29 +++++++++++++--- .../TimeRangeSettingsProvider.tsx | 21 +++++++++++- .../runtime/TimeRangeProvider/query-params.ts | 34 +++++++++++++++---- 8 files changed, 119 insertions(+), 27 deletions(-) diff --git a/components/src/RefreshIntervalPicker/RefreshIntervalPicker.tsx b/components/src/RefreshIntervalPicker/RefreshIntervalPicker.tsx index 7ae4ba9a..82654af5 100644 --- a/components/src/RefreshIntervalPicker/RefreshIntervalPicker.tsx +++ b/components/src/RefreshIntervalPicker/RefreshIntervalPicker.tsx @@ -21,10 +21,11 @@ interface RefreshIntervalPickerProps { value?: DurationString; onChange: (value: DurationString) => void; height?: string; + disabled?: boolean; } export function RefreshIntervalPicker(props: RefreshIntervalPickerProps): ReactElement { - const { value, onChange, timeOptions, height } = props; + const { value, onChange, timeOptions, height, disabled = false } = props; // If the dashboard refresh interval is not provided in timeOptions, it will create a specific option for the select const customInterval = useMemo(() => { @@ -39,6 +40,7 @@ export function RefreshIntervalPicker(props: RefreshIntervalPickerProps): ReactE