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.
 
 
 
 

40 lines
1017 B

import { PanelPlugin } from '@grafana/data';
import { SimpleOptions } from './types';
import { SimplePanel } from './SimplePanel';
export const plugin = new PanelPlugin<SimpleOptions>(SimplePanel).setPanelOptions(builder => {
return builder
.addTextInput({
path: 'text',
name: 'Simple text option',
description: 'Description of panel option',
defaultValue: 'Default value of text input option',
})
.addBooleanSwitch({
path: 'showSeriesCount',
name: 'Show series counter',
defaultValue: false,
})
.addRadio({
path: 'seriesCountSize',
defaultValue: 'sm',
name: 'Series counter size',
settings: {
options: [
{
value: 'sm',
label: 'Small',
},
{
value: 'md',
label: 'Medium',
},
{
value: 'lg',
label: 'Large',
},
],
},
showIf: config => config.showSeriesCount,
});
});