mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
25 lines
780 B
TypeScript
25 lines
780 B
TypeScript
import { PanelPlugin } from '@grafana/data';
|
|
|
|
import { NewsPanel } from './NewsPanel';
|
|
import { DEFAULT_FEED_URL } from './constants';
|
|
import { PanelOptions, defaultPanelOptions } from './panelcfg.gen';
|
|
|
|
export const plugin = new PanelPlugin<PanelOptions>(NewsPanel).setPanelOptions((builder) => {
|
|
builder
|
|
.addTextInput({
|
|
path: 'feedUrl',
|
|
name: 'URL',
|
|
description: 'Supports RSS and Atom feeds',
|
|
settings: {
|
|
placeholder: DEFAULT_FEED_URL,
|
|
},
|
|
defaultValue: defaultPanelOptions.feedUrl,
|
|
})
|
|
.addBooleanSwitch({
|
|
path: 'showImage',
|
|
name: 'Show image',
|
|
description: 'Controls if the news item social (og:image) image is shown above text content',
|
|
defaultValue: defaultPanelOptions.showImage,
|
|
});
|
|
});
|