|
|
@ -6,7 +6,8 @@ export const plugin = new PanelPlugin<PanelOptions>(Panel).setPanelOptions((buil |
|
|
|
return builder |
|
|
|
return builder |
|
|
|
.addRadio({ |
|
|
|
.addRadio({ |
|
|
|
path: 'visualizationType', |
|
|
|
path: 'visualizationType', |
|
|
|
name: 'Visualization type', |
|
|
|
name: 'Pod', |
|
|
|
|
|
|
|
category: ['Visualization'], |
|
|
|
defaultValue: Pod.GAUGE, |
|
|
|
defaultValue: Pod.GAUGE, |
|
|
|
settings: { |
|
|
|
settings: { |
|
|
|
options: [ |
|
|
|
options: [ |
|
|
@ -28,37 +29,16 @@ export const plugin = new PanelPlugin<PanelOptions>(Panel).setPanelOptions((buil |
|
|
|
], |
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
}) |
|
|
|
}) |
|
|
|
.addTextInput({ |
|
|
|
.addNumberInput({ |
|
|
|
path: 'text', |
|
|
|
path: 'gauge.min', |
|
|
|
name: 'Simple text option', |
|
|
|
name: 'Min', |
|
|
|
description: 'Description of panel option', |
|
|
|
category: ['Gauge'], |
|
|
|
defaultValue: 'Default value of text input option', |
|
|
|
showIf: (config) => config.visualizationType === Pod.GAUGE, |
|
|
|
}) |
|
|
|
|
|
|
|
.addBooleanSwitch({ |
|
|
|
|
|
|
|
path: 'showSeriesCount', |
|
|
|
|
|
|
|
name: 'Show series counter', |
|
|
|
|
|
|
|
defaultValue: false, |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
.addRadio({ |
|
|
|
.addNumberInput({ |
|
|
|
path: 'seriesCountSize', |
|
|
|
path: 'gauge.max', |
|
|
|
defaultValue: 'sm', |
|
|
|
name: 'Max', |
|
|
|
name: 'Series counter size', |
|
|
|
category: ['Gauge'], |
|
|
|
settings: { |
|
|
|
|
|
|
|
options: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
value: 'sm', |
|
|
|
|
|
|
|
label: 'Small', |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
value: 'md', |
|
|
|
|
|
|
|
label: 'Medium', |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
value: 'lg', |
|
|
|
|
|
|
|
label: 'Large', |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
showIf: (config) => config.visualizationType === Pod.GAUGE, |
|
|
|
showIf: (config) => config.visualizationType === Pod.GAUGE, |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|