|
|
@ -5,6 +5,7 @@ import { IconsEditor } from './components/editors/IconsEditor'; |
|
|
|
import { ThresholdsEditor } from './components/editors/ThresholdsEditor'; |
|
|
|
import { ThresholdsEditor } from './components/editors/ThresholdsEditor'; |
|
|
|
|
|
|
|
|
|
|
|
import { PanelPlugin } from '@grafana/data'; |
|
|
|
import { PanelPlugin } from '@grafana/data'; |
|
|
|
|
|
|
|
import { NotSupportedText } from 'components/editors/NotSupportedText'; |
|
|
|
|
|
|
|
|
|
|
|
export const plugin = new PanelPlugin<PanelOptions>(Panel).setPanelOptions((builder) => { |
|
|
|
export const plugin = new PanelPlugin<PanelOptions>(Panel).setPanelOptions((builder) => { |
|
|
|
return builder |
|
|
|
return builder |
|
|
@ -18,21 +19,26 @@ export const plugin = new PanelPlugin<PanelOptions>(Panel).setPanelOptions((buil |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: 'Gauge', |
|
|
|
label: 'Gauge', |
|
|
|
value: Pod.GAUGE, |
|
|
|
value: Pod.GAUGE, |
|
|
|
description: 'Enable gauge pod', |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: 'Line', |
|
|
|
label: 'Line', |
|
|
|
value: Pod.LINE, |
|
|
|
value: Pod.LINE, |
|
|
|
description: 'Enable line pod', |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: 'Bar', |
|
|
|
label: 'Bar', |
|
|
|
value: Pod.BAR, |
|
|
|
value: Pod.BAR, |
|
|
|
description: 'Enable bar pod', |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
.addCustomEditor({ |
|
|
|
|
|
|
|
id: 'notSupportedText', |
|
|
|
|
|
|
|
name: 'This visualization is not supported', |
|
|
|
|
|
|
|
category: ['Visualization'], |
|
|
|
|
|
|
|
path: '', |
|
|
|
|
|
|
|
showIf: (config) => config.visualizationType !== Pod.GAUGE, |
|
|
|
|
|
|
|
editor: NotSupportedText as any, |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
.addFieldNamePicker({ |
|
|
|
.addFieldNamePicker({ |
|
|
|
name: 'Value', |
|
|
|
name: 'Value', |
|
|
|