diff --git a/packages/grafana-ui/src/utils/displayValue.test.ts b/packages/grafana-ui/src/utils/displayValue.test.ts index 1f426aad5b0..bf0e7a89bba 100644 --- a/packages/grafana-ui/src/utils/displayValue.test.ts +++ b/packages/grafana-ui/src/utils/displayValue.test.ts @@ -1,8 +1,8 @@ import { getDisplayProcessor, getColorFromThreshold, DisplayProcessor, DisplayValue } from './displayValue'; import { MappingType, ValueMapping } from '../types/panel'; -function assertSame(input: any, processorss: DisplayProcessor[], match: DisplayValue) { - processorss.forEach(processor => { +function assertSame(input: any, processors: DisplayProcessor[], match: DisplayValue) { + processors.forEach(processor => { const value = processor(input); expect(value.text).toEqual(match.text); if (match.hasOwnProperty('numeric')) { diff --git a/public/app/plugins/panel/bargauge/module.tsx b/public/app/plugins/panel/bargauge/module.tsx index 5ca355b3110..3c46adeb4f9 100644 --- a/public/app/plugins/panel/bargauge/module.tsx +++ b/public/app/plugins/panel/bargauge/module.tsx @@ -3,10 +3,10 @@ import { ReactPanelPlugin } from '@grafana/ui'; import { BarGaugePanel } from './BarGaugePanel'; import { BarGaugePanelEditor } from './BarGaugePanelEditor'; import { BarGaugeOptions, defaults } from './types'; -import { singleStatOptionsCheck } from '../singlestat2/module'; +import { singleStatBaseOptionsCheck } from '../singlestat2/module'; export const reactPanel = new ReactPanelPlugin(BarGaugePanel); reactPanel.setEditor(BarGaugePanelEditor); reactPanel.setDefaults(defaults); -reactPanel.setPanelTypeChangedHook(singleStatOptionsCheck); +reactPanel.setPanelTypeChangedHook(singleStatBaseOptionsCheck); diff --git a/public/app/plugins/panel/gauge/module.tsx b/public/app/plugins/panel/gauge/module.tsx index 7d56ac5641b..340af06a080 100644 --- a/public/app/plugins/panel/gauge/module.tsx +++ b/public/app/plugins/panel/gauge/module.tsx @@ -3,10 +3,10 @@ import { ReactPanelPlugin } from '@grafana/ui'; import { GaugePanelEditor } from './GaugePanelEditor'; import { GaugePanel } from './GaugePanel'; import { GaugeOptions, defaults } from './types'; -import { singleStatOptionsCheck } from '../singlestat2/module'; +import { singleStatBaseOptionsCheck } from '../singlestat2/module'; export const reactPanel = new ReactPanelPlugin(GaugePanel); reactPanel.setEditor(GaugePanelEditor); reactPanel.setDefaults(defaults); -reactPanel.setPanelTypeChangedHook(singleStatOptionsCheck); +reactPanel.setPanelTypeChangedHook(singleStatBaseOptionsCheck); diff --git a/public/app/plugins/panel/singlestat2/module.tsx b/public/app/plugins/panel/singlestat2/module.tsx index c07e24e5198..283b32802e1 100644 --- a/public/app/plugins/panel/singlestat2/module.tsx +++ b/public/app/plugins/panel/singlestat2/module.tsx @@ -1,5 +1,5 @@ import { ReactPanelPlugin } from '@grafana/ui'; -import { SingleStatOptions, defaults } from './types'; +import { SingleStatOptions, defaults, SingleStatBaseOptions } from './types'; import { SingleStatPanel } from './SingleStatPanel'; import cloneDeep from 'lodash/cloneDeep'; import { SingleStatEditor } from './SingleStatEditor'; @@ -8,8 +8,8 @@ export const reactPanel = new ReactPanelPlugin(SingleStatPane const optionsToKeep = ['valueOptions', 'stat', 'maxValue', 'maxValue', 'thresholds', 'valueMappings']; -export const singleStatOptionsCheck = ( - options: Partial, +export const singleStatBaseOptionsCheck = ( + options: Partial, prevPluginId?: string, prevOptions?: any ) => { @@ -26,4 +26,4 @@ export const singleStatOptionsCheck = ( reactPanel.setEditor(SingleStatEditor); reactPanel.setDefaults(defaults); -reactPanel.setPanelTypeChangedHook(singleStatOptionsCheck); +reactPanel.setPanelTypeChangedHook(singleStatBaseOptionsCheck);