mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* Remove deprecated setDefault usages * Add simple support for conditinal field config properties * Use new API in NewsPanel * Update tests * Fix check
39 lines
996 B
TypeScript
39 lines
996 B
TypeScript
import { PanelPlugin } from '@grafana/data';
|
|
import { Options } from './types';
|
|
import { LogsPanel } from './LogsPanel';
|
|
import { SortOrder } from '../../../core/utils/explore';
|
|
|
|
export const plugin = new PanelPlugin<Options>(LogsPanel).setPanelOptions(builder => {
|
|
builder
|
|
.addBooleanSwitch({
|
|
path: 'showTime',
|
|
name: 'Time',
|
|
description: '',
|
|
defaultValue: false,
|
|
})
|
|
.addBooleanSwitch({
|
|
path: 'showLabels',
|
|
name: 'Unique labels',
|
|
description: '',
|
|
defaultValue: false,
|
|
})
|
|
.addBooleanSwitch({
|
|
path: 'wrapLogMessage',
|
|
name: 'Wrap lines',
|
|
description: '',
|
|
defaultValue: false,
|
|
})
|
|
.addRadio({
|
|
path: 'sortOrder',
|
|
name: 'Order',
|
|
description: '',
|
|
settings: {
|
|
options: [
|
|
{ value: SortOrder.Descending, label: 'Descending' },
|
|
{ value: SortOrder.Ascending, label: 'Ascending' },
|
|
],
|
|
},
|
|
defaultValue: SortOrder.Descending,
|
|
});
|
|
});
|