mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
Fix error when setting alerts for Azure Monitor (#42989)
* pass the correct value to buildScaleKey() * drop unnecessary type casting Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com> * fix linting errors Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
This commit is contained in:
parent
f789a7f88c
commit
15c214d467
@ -1,6 +1,6 @@
|
|||||||
import React, { useState, useLayoutEffect, useMemo, useRef } from 'react';
|
import React, { useState, useLayoutEffect, useMemo, useRef } from 'react';
|
||||||
import { FieldConfigSource, ThresholdsConfig, getValueFormat, FieldConfig } from '@grafana/data';
|
import { FieldConfigSource, ThresholdsConfig, getValueFormat } from '@grafana/data';
|
||||||
import { UPlotConfigBuilder, buildScaleKey, GraphFieldConfig } from '@grafana/ui';
|
import { UPlotConfigBuilder, buildScaleKey } from '@grafana/ui';
|
||||||
import { ThresholdDragHandle } from './ThresholdDragHandle';
|
import { ThresholdDragHandle } from './ThresholdDragHandle';
|
||||||
import uPlot from 'uplot';
|
import uPlot from 'uplot';
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ export const ThresholdControlsPlugin: React.FC<ThresholdControlsPluginProps> = (
|
|||||||
if (!thresholds) {
|
if (!thresholds) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
const scale = buildScaleKey(fieldConfig as FieldConfig<GraphFieldConfig>);
|
const scale = buildScaleKey(fieldConfig.defaults);
|
||||||
|
|
||||||
const decimals = fieldConfig.defaults.decimals;
|
const decimals = fieldConfig.defaults.decimals;
|
||||||
const handles = [];
|
const handles = [];
|
||||||
|
Loading…
Reference in New Issue
Block a user