Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { ReactPanelPlugin, sharedSingleStatMigrationCheck, sharedSingleStatOptionsCheck } from '@grafana/ui';
import { SingleStatOptions, defaults } from './types';
import { SingleStatPanel } from './SingleStatPanel';
import { SingleStatEditor } from './SingleStatEditor';
export const reactPanel = new ReactPanelPlugin(SingleStatPanel)
.setDefaults(defaults)
.setEditor(SingleStatEditor)
.setPanelChangeHandler(sharedSingleStatOptionsCheck)
.setMigrationHandler(sharedSingleStatMigrationCheck);
dataFormats: [],
info: {
author: {
name: '',
},
description: '',
links: [],
logos: {
large: '',
small: '',
},
screenshots: [],
updated: '',
version: '',
},
reactPlugin: new ReactPanelPlugin(NotFound),
angularPlugin: null,
};
}
import { ReactPanelPlugin, sharedSingleStatMigrationCheck, sharedSingleStatOptionsCheck } from '@grafana/ui';
import { GaugePanelEditor } from './GaugePanelEditor';
import { GaugePanel } from './GaugePanel';
import { GaugeOptions, defaults } from './types';
export const reactPanel = new ReactPanelPlugin(GaugePanel)
.setDefaults(defaults)
.setEditor(GaugePanelEditor)
.setPanelChangeHandler(sharedSingleStatOptionsCheck)
.setMigrationHandler(sharedSingleStatMigrationCheck);
import { ReactPanelPlugin, sharedSingleStatOptionsCheck } from '@grafana/ui';
import { BarGaugePanel } from './BarGaugePanel';
import { BarGaugePanelEditor } from './BarGaugePanelEditor';
import { BarGaugeOptions, defaults } from './types';
export const reactPanel = new ReactPanelPlugin(BarGaugePanel)
.setDefaults(defaults)
.setEditor(BarGaugePanelEditor)
.setPanelChangeHandler(sharedSingleStatOptionsCheck);
import { ReactPanelPlugin } from '@grafana/ui';
import { TextPanelEditor } from './TextPanelEditor';
import { TextPanel } from './TextPanel';
import { TextOptions, defaults } from './types';
export const reactPanel = new ReactPanelPlugin(TextPanel)
.setDefaults(defaults)
.setEditor(TextPanelEditor)
.setPanelChangeHandler((options: TextOptions, prevPluginId: string, prevOptions: any) => {
if (prevPluginId === 'text') {
return prevOptions as TextOptions;
}
return options;
});