mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
influxdb: influxql: more robust resultformat-handling (#39330)
This commit is contained in:
@@ -20,11 +20,14 @@ export const RawInfluxQLEditor = ({ query, onChange, onRunQuery }: Props): JSX.E
|
||||
const aliasElementId = useUniqueId();
|
||||
const selectElementId = useUniqueId();
|
||||
|
||||
const resultFormat = query.resultFormat ?? DEFAULT_RESULT_FORMAT;
|
||||
|
||||
const applyDelayedChangesAndRunQuery = () => {
|
||||
onChange({
|
||||
...query,
|
||||
query: currentQuery,
|
||||
alias: currentAlias,
|
||||
resultFormat,
|
||||
});
|
||||
onRunQuery();
|
||||
};
|
||||
@@ -51,7 +54,7 @@ export const RawInfluxQLEditor = ({ query, onChange, onRunQuery }: Props): JSX.E
|
||||
onChange({ ...query, resultFormat: v.value });
|
||||
onRunQuery();
|
||||
}}
|
||||
value={query.resultFormat ?? DEFAULT_RESULT_FORMAT}
|
||||
value={resultFormat}
|
||||
options={RESULT_FORMATS}
|
||||
/>
|
||||
<InlineFormLabel htmlFor={aliasElementId}>Alias by</InlineFormLabel>
|
||||
|
||||
Reference in New Issue
Block a user