文件操作 - module.tsx
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/grafana/public/app/plugins/panel/graph2/module.tsx
编辑文件内容
import { FieldConfigProperty, PanelPlugin } from '@grafana/data'; import { GraphPanel } from './GraphPanel'; import { Options } from './types'; export const plugin = new PanelPlugin<Options>(GraphPanel) .useFieldConfig({ standardOptions: [FieldConfigProperty.Unit, FieldConfigProperty.Decimals] }) .setPanelOptions(builder => { builder .addBooleanSwitch({ path: 'graph.showBars', name: 'Show bars', description: '', defaultValue: false, }) .addBooleanSwitch({ path: 'graph.showLines', name: 'Show lines', description: '', defaultValue: true, }) .addBooleanSwitch({ path: 'graph.showPoints', name: 'Show poins', description: '', defaultValue: false, }) .addBooleanSwitch({ path: 'legend.isVisible', name: 'Show legend', description: '', defaultValue: true, }) .addBooleanSwitch({ path: 'legend.asTable', name: 'Display legend as table', description: '', defaultValue: false, }) .addRadio({ path: 'legend.placement', name: 'Legend placement', description: '', defaultValue: 'under', settings: { options: [ { value: 'under', label: 'Below graph' }, { value: 'right', label: 'Right to the graph' }, ], }, }) .addRadio({ path: 'tooltipOptions.mode', name: 'Tooltip mode', description: '', defaultValue: 'single', settings: { options: [ { value: 'single', label: 'Single series' }, { value: 'multi', label: 'All series' }, ], }, }); });
修改文件时间
将文件时间修改为当前时间的前一年
删除文件