Transforms: Fix schema definition (#62619)

This commit is contained in:
Ryan McKinley
2023-01-31 10:03:08 -08:00
committed by GitHub
parent 91221bc436
commit 4186871390
9 changed files with 58 additions and 64 deletions

View File

@@ -1,6 +1,6 @@
import { MonoTypeOperatorFunction } from 'rxjs';
import { MatcherConfig } from '@grafana/schema';
import { MatcherConfig, DataTransformerConfig } from '@grafana/schema';
import { RegistryItemWithOptions } from '../utils/Registry';
@@ -41,27 +41,9 @@ export interface SynchronousDataTransformerInfo<TOptions = any> extends DataTran
}
/**
* @public
* @deprecated use TransformationConfig from schema
*/
export interface DataTransformerConfig<TOptions = any> {
/**
* Unique identifier of transformer
*/
id: string;
/**
* Disabled transformations are skipped
*/
disabled?: boolean;
/** Optional frame matcher. When missing it will be applied to all results */
filter?: MatcherConfig;
/**
* Options to be passed to the transformer
*/
options: TOptions;
}
export type { DataTransformerConfig };
export type FrameMatcher = (frame: DataFrame) => boolean;
export type FieldMatcher = (field: Field, frame: DataFrame, allFrames: DataFrame[]) => boolean;