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
|
||||
value={query.query}
|
||||
onChange={(e) => {
|
||||
let newQueries = options.jsonData.tracesToMetrics?.queries.slice() ?? [];
|
||||
newQueries[i].query = e.currentTarget.value;
|
||||
const updatedQueries = (options.jsonData.tracesToMetrics?.queries ?? []).map(
|
||||
(traceToMetricQuery, index) => {
|
||||
return index === i ? { ...traceToMetricQuery, query: e.currentTarget.value } : traceToMetricQuery;
|
||||
}
|
||||
);
|
||||
updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'tracesToMetrics', {
|
||||
...options.jsonData.tracesToMetrics,
|
||||
queries: newQueries,
|
||||
queries: updatedQueries,
|
||||
});
|
||||
}}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user