mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Tempo: Fix read-only access error (#78801)
This commit is contained in:
parent
520c927931
commit
ae3f1506df
@ -156,11 +156,14 @@ export function TraceToMetricsSettings({ options, onOptionsChange }: Props) {
|
|||||||
allowFullScreen
|
allowFullScreen
|
||||||
value={query.query}
|
value={query.query}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
let newQueries = options.jsonData.tracesToMetrics?.queries.slice() ?? [];
|
const updatedQueries = (options.jsonData.tracesToMetrics?.queries ?? []).map(
|
||||||
newQueries[i].query = e.currentTarget.value;
|
(traceToMetricQuery, index) => {
|
||||||
|
return index === i ? { ...traceToMetricQuery, query: e.currentTarget.value } : traceToMetricQuery;
|
||||||
|
}
|
||||||
|
);
|
||||||
updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'tracesToMetrics', {
|
updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'tracesToMetrics', {
|
||||||
...options.jsonData.tracesToMetrics,
|
...options.jsonData.tracesToMetrics,
|
||||||
queries: newQueries,
|
queries: updatedQueries,
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
Loading…
Reference in New Issue
Block a user