import { PanelPlugin } from '@grafana/data'; import { PanelOptions, Pod } from './types'; import { Panel } from './components/Panel'; export const plugin = new PanelPlugin(Panel).setPanelOptions((builder) => { return builder .addRadio({ path: 'visualizationType', name: 'Pod', category: ['Visualization'], defaultValue: Pod.GAUGE, settings: { options: [ { label: 'Gauge', value: Pod.GAUGE, description: 'Enable gauge pod', }, { label: 'Line', value: Pod.LINE, description: 'Enable line pod', }, { label: 'Bar', value: Pod.BAR, description: 'Enable bar pod', }, ], }, }) .addNumberInput({ path: 'gauge.min', name: 'Min', category: ['Gauge'], showIf: (config) => config.visualizationType === Pod.GAUGE, }) .addNumberInput({ path: 'gauge.max', name: 'Max', category: ['Gauge'], showIf: (config) => config.visualizationType === Pod.GAUGE, }); });