module.tsx 659 B

1234567891011121314151617181920212223
  1. import { DataSourcePlugin } from '@grafana/data';
  2. import { ConfigEditor } from './ConfigEditor';
  3. import { QueryEditor } from './QueryEditor';
  4. import { TestInfoTab } from './TestInfoTab';
  5. import { TestDataDataSource } from './datasource';
  6. class TestDataAnnotationsQueryCtrl {
  7. annotation: any;
  8. constructor() {}
  9. static template = '<h2>Annotation scenario</h2>';
  10. }
  11. export const plugin = new DataSourcePlugin(TestDataDataSource)
  12. .setConfigEditor(ConfigEditor)
  13. .setQueryEditor(QueryEditor)
  14. .setAnnotationQueryCtrl(TestDataAnnotationsQueryCtrl)
  15. .addConfigPage({
  16. title: 'Setup',
  17. icon: 'list-ul',
  18. body: TestInfoTab,
  19. id: 'setup',
  20. });