mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Dashboards: Support an auto refresh interval that is based on the query range (#70479)
This commit is contained in:
@@ -2,7 +2,7 @@ import { defaultIntervals } from '@grafana/ui';
|
||||
|
||||
interface Args {
|
||||
urlRefresh: string | null;
|
||||
currentRefresh: string | boolean | undefined;
|
||||
currentRefresh: string | false | undefined;
|
||||
isAllowedIntervalFn: (interval: string) => boolean;
|
||||
minRefreshInterval: string;
|
||||
refreshIntervals?: string[];
|
||||
@@ -18,7 +18,7 @@ export function getRefreshFromUrl({
|
||||
isAllowedIntervalFn,
|
||||
minRefreshInterval,
|
||||
refreshIntervals = defaultIntervals,
|
||||
}: Args): string | boolean | undefined {
|
||||
}: Args): string | false | undefined {
|
||||
if (!urlRefresh) {
|
||||
return currentRefresh;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user