You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.1 KiB
44 lines
1.1 KiB
import { PanelPlugin } from '@grafana/data'; |
|
import { PanelOptions, Pod } from './types'; |
|
import { Panel } from './components/Panel'; |
|
|
|
export const plugin = new PanelPlugin<PanelOptions>(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, |
|
}); |
|
});
|
|
|