mirror of https://github.com/grafana/grafana.git
Transformation: generic support for variables, yay
This commit is contained in:
parent
126396399e
commit
deec7c306b
|
|
@ -24,11 +24,14 @@ const getOperator =
|
|||
const defaultOptions = info.transformation.defaultOptions ?? {};
|
||||
const options = { ...defaultOptions, ...config.options };
|
||||
|
||||
const interpolated = JSON.parse(ctx.interpolate(JSON.stringify(options)));
|
||||
|
||||
console.log('interpolated', interpolated);
|
||||
const matcher = config.filter?.options ? getFrameMatchers(config.filter) : undefined;
|
||||
return source.pipe(
|
||||
mergeMap((before) =>
|
||||
of(filterInput(before, matcher)).pipe(
|
||||
info.transformation.operator(options, ctx),
|
||||
info.transformation.operator(interpolated, ctx),
|
||||
postProcessTransform(before, info, matcher)
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue