mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 01:42:13 +08:00

* Update module.tsx Corrected the options: Render Count, Data Changed Count, and Schema Changed Count to have the correct sentence casing to match the rest of the product * Live viz update Correct type case error on "Show Message" to "Show message" * Trend viz case correction Corrected case of Trend viz from "X Axis" and "X Field" to "X axis" and "X field"
59 lines
1.7 KiB
TypeScript
59 lines
1.7 KiB
TypeScript
import { PanelPlugin } from '@grafana/data';
|
|
|
|
import { DebugPanel } from './DebugPanel';
|
|
import { StateViewEditor } from './StateView';
|
|
import { DebugMode, Options } from './panelcfg.gen';
|
|
|
|
export const plugin = new PanelPlugin<Options>(DebugPanel).useFieldConfig().setPanelOptions((builder) => {
|
|
builder
|
|
.addSelect({
|
|
path: 'mode',
|
|
name: 'Mode',
|
|
defaultValue: DebugMode.Render,
|
|
settings: {
|
|
options: [
|
|
{ label: 'Render', value: DebugMode.Render },
|
|
{ label: 'Events', value: DebugMode.Events },
|
|
{ label: 'Cursor', value: DebugMode.Cursor },
|
|
{ label: 'Cursor', value: DebugMode.Cursor },
|
|
{ label: 'Share state', value: DebugMode.State },
|
|
{ label: 'Throw error', value: DebugMode.ThrowError },
|
|
],
|
|
},
|
|
})
|
|
.addCustomEditor({
|
|
id: 'stateView',
|
|
path: 'stateView',
|
|
name: 'State view',
|
|
defaultValue: '',
|
|
showIf: ({ mode }) => mode === DebugMode.State,
|
|
editor: StateViewEditor,
|
|
})
|
|
.addBooleanSwitch({
|
|
path: 'counters.render',
|
|
name: 'Render count',
|
|
defaultValue: true,
|
|
showIf: ({ mode }) => mode === DebugMode.Render,
|
|
})
|
|
.addBooleanSwitch({
|
|
path: 'counters.dataChanged',
|
|
name: 'Data changed count',
|
|
defaultValue: true,
|
|
showIf: ({ mode }) => mode === DebugMode.Render,
|
|
})
|
|
.addBooleanSwitch({
|
|
path: 'counters.schemaChanged',
|
|
name: 'Schema changed count',
|
|
defaultValue: true,
|
|
showIf: ({ mode }) => mode === DebugMode.Render,
|
|
})
|
|
.addDashboardPicker({
|
|
path: 'dashboardUID',
|
|
name: 'Dashboard',
|
|
settings: {
|
|
placeholder: 'Select dashboard',
|
|
isClearable: true,
|
|
},
|
|
});
|
|
});
|