diff --git a/public/app/plugins/datasource/influxdb/components/editor/variable/VariableQueryEditor.tsx b/public/app/plugins/datasource/influxdb/components/editor/variable/VariableQueryEditor.tsx index 9de9f8f216f..5cab87fe886 100644 --- a/public/app/plugins/datasource/influxdb/components/editor/variable/VariableQueryEditor.tsx +++ b/public/app/plugins/datasource/influxdb/components/editor/variable/VariableQueryEditor.tsx @@ -13,7 +13,7 @@ type Props = QueryEditorProps { - const getFluxVariableQuery = (q: InfluxVariableQuery | string) => { + const getVariableQuery = (q: InfluxVariableQuery | string) => { // in legacy variable support query can be only a string // in new variable support query can be an object and hold more information // to be able to support old version we check the query here @@ -24,7 +24,7 @@ export const InfluxVariableEditor = ({ onChange, datasource, query }: Props) => return { refId, query: q, - maxDataPoints: 1000, + ...(datasource.version === InfluxVersion.Flux ? { maxDataPoints: 1000 } : {}), }; }; @@ -34,7 +34,7 @@ export const InfluxVariableEditor = ({ onChange, datasource, query }: Props) => <> { onChange({ ...query, query: q.query ?? '' }); }} @@ -72,11 +72,11 @@ export const InfluxVariableEditor = ({ onChange, datasource, query }: Props) =>