mirror of
https://github.com/grafana/grafana.git
synced 2025-02-14 01:23:32 -06:00
* Updated package json but not updated source files * Update eslint plugin * updated files
38 lines
1.1 KiB
TypeScript
Executable File
38 lines
1.1 KiB
TypeScript
Executable File
import { PanelPlugin } from '@grafana/data';
|
|
import { LiveChannelEditor } from './LiveChannelEditor';
|
|
import { LivePanel } from './LivePanel';
|
|
import { LivePanelOptions, MessageDisplayMode } from './types';
|
|
|
|
export const plugin = new PanelPlugin<LivePanelOptions>(LivePanel).setPanelOptions((builder) => {
|
|
builder.addCustomEditor({
|
|
category: ['Channel'],
|
|
id: 'channel',
|
|
path: 'channel',
|
|
name: 'Channel',
|
|
editor: LiveChannelEditor,
|
|
defaultValue: {},
|
|
});
|
|
|
|
builder
|
|
.addRadio({
|
|
path: 'message',
|
|
name: 'Show Message',
|
|
description: 'Display the last message received on this channel',
|
|
settings: {
|
|
options: [
|
|
{ value: MessageDisplayMode.Raw, label: 'Raw Text' },
|
|
{ value: MessageDisplayMode.JSON, label: 'JSON' },
|
|
{ value: MessageDisplayMode.Auto, label: 'Auto' },
|
|
{ value: MessageDisplayMode.None, label: 'None' },
|
|
],
|
|
},
|
|
defaultValue: MessageDisplayMode.JSON,
|
|
})
|
|
.addBooleanSwitch({
|
|
path: 'publish',
|
|
name: 'Show Publish',
|
|
description: 'Display a form to publish values',
|
|
defaultValue: false,
|
|
});
|
|
});
|