mirror of
https://github.com/grafana/grafana.git
synced 2025-08-01 20:52:10 +08:00

* kindsys: Adapt to new PanelCfg schema interface * building locally * Remove Panel prefix in cue files * Regenerate * Update imports * fixup! Merge branch 'remove-panel-prefix' into sdboyer/redundant-panelcfg-prefixes * Fix formatting --------- Co-authored-by: Ryan McKinley <ryantxu@gmail.com> Co-authored-by: Tania B <yalyna.ts@gmail.com>
25 lines
755 B
TypeScript
25 lines
755 B
TypeScript
import { PanelPlugin } from '@grafana/data';
|
|
|
|
import { NewsPanel } from './NewsPanel';
|
|
import { DEFAULT_FEED_URL } from './constants';
|
|
import { Options, defaultOptions } from './panelcfg.gen';
|
|
|
|
export const plugin = new PanelPlugin<Options>(NewsPanel).setPanelOptions((builder) => {
|
|
builder
|
|
.addTextInput({
|
|
path: 'feedUrl',
|
|
name: 'URL',
|
|
description: 'Supports RSS and Atom feeds',
|
|
settings: {
|
|
placeholder: DEFAULT_FEED_URL,
|
|
},
|
|
defaultValue: defaultOptions.feedUrl,
|
|
})
|
|
.addBooleanSwitch({
|
|
path: 'showImage',
|
|
name: 'Show image',
|
|
description: 'Controls if the news item social (og:image) image is shown above text content',
|
|
defaultValue: defaultOptions.showImage,
|
|
});
|
|
});
|