models.gen.ts 958 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import { FrameGeometrySource, FrameGeometrySourceMode } from '@grafana/data';
  2. // This file should be generated by cue schema
  3. export enum SpatialAction {
  4. Prepare = 'prepare',
  5. Calculate = 'calculate',
  6. Modify = 'modify',
  7. }
  8. export enum SpatialCalculation {
  9. Heading = 'heading',
  10. Distance = 'distance',
  11. Area = 'area',
  12. }
  13. export enum SpatialOperation {
  14. AsLine = 'asLine',
  15. LineBuilder = 'lineBuilder',
  16. }
  17. export interface SpatialCalculationOption {
  18. calc?: SpatialCalculation;
  19. field?: string;
  20. }
  21. export interface ModifyOptions {
  22. op: SpatialOperation;
  23. target?: FrameGeometrySource;
  24. }
  25. /** The main transformer options */
  26. export interface SpatialTransformOptions {
  27. action?: SpatialAction;
  28. source?: FrameGeometrySource;
  29. calculate?: SpatialCalculationOption;
  30. modify?: ModifyOptions;
  31. }
  32. export const defaultOptions: SpatialTransformOptions = {
  33. action: SpatialAction.Prepare,
  34. source: {
  35. mode: FrameGeometrySourceMode.Auto,
  36. },
  37. };