registry.ts 832 B

1234567891011121314151617181920212223242526
  1. import { Registry } from '@grafana/data';
  2. import { CanvasElementItem, CanvasElementOptions } from './element';
  3. import { buttonItem } from './elements/button';
  4. import { droneFrontItem } from './elements/droneFront';
  5. import { droneSideItem } from './elements/droneSide';
  6. import { droneTopItem } from './elements/droneTop';
  7. import { iconItem } from './elements/icon';
  8. import { textBoxItem } from './elements/textBox';
  9. import { windTurbineItem } from './elements/windTurbine';
  10. export const DEFAULT_CANVAS_ELEMENT_CONFIG: CanvasElementOptions = {
  11. ...iconItem.getNewOptions(),
  12. type: iconItem.id,
  13. name: `Element 1`,
  14. };
  15. export const canvasElementRegistry = new Registry<CanvasElementItem>(() => [
  16. iconItem, // default for now
  17. textBoxItem,
  18. buttonItem,
  19. droneTopItem,
  20. droneFrontItem,
  21. droneSideItem,
  22. windTurbineItem,
  23. ]);