mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Transformers: Do not add transformation info to output frames (#81747)
This commit is contained in:
parent
315d3a7a72
commit
9d17f6e6aa
@ -55,19 +55,6 @@ const postProcessTransform =
|
||||
return after;
|
||||
}
|
||||
|
||||
// Add a key to the metadata if the data changed
|
||||
for (const series of after) {
|
||||
if (!series.meta) {
|
||||
series.meta = {};
|
||||
}
|
||||
|
||||
if (!series.meta.transformations) {
|
||||
series.meta.transformations = [info.id];
|
||||
} else {
|
||||
series.meta.transformations = [...series.meta.transformations, info.id];
|
||||
}
|
||||
}
|
||||
|
||||
// Add back the filtered out frames
|
||||
if (matcher) {
|
||||
// keep the frame order the same
|
||||
|
@ -109,11 +109,6 @@ describe('ensureColumns transformer', () => {
|
||||
},
|
||||
],
|
||||
"length": 2,
|
||||
"meta": {
|
||||
"transformations": [
|
||||
"ensureColumns",
|
||||
],
|
||||
},
|
||||
}
|
||||
`);
|
||||
});
|
||||
|
@ -54,9 +54,6 @@ export interface QueryResultMeta {
|
||||
/** Meta Notices */
|
||||
notices?: QueryResultMetaNotice[];
|
||||
|
||||
/** Used to track transformation ids that where part of the processing */
|
||||
transformations?: string[];
|
||||
|
||||
/** Currently used to show results in Explore only in preferred visualisation option */
|
||||
preferredVisualisationType?: PreferredVisualisationType;
|
||||
|
||||
|
@ -313,9 +313,6 @@ describe('Fields from JSON', () => {
|
||||
},
|
||||
],
|
||||
length: 2,
|
||||
meta: {
|
||||
transformations: ['sortBy'],
|
||||
},
|
||||
};
|
||||
|
||||
const frames = extractFieldsTransformer.transformer(extractConfig, ctx)([testDataFrame]);
|
||||
|
@ -109,10 +109,7 @@ export const StateTimelinePanel = ({
|
||||
* Render nothing in this case to prevent error.
|
||||
* See https://github.com/grafana/support-escalations/issues/932
|
||||
*/
|
||||
if (
|
||||
(!alignedData.meta?.transformations?.length && alignedData.fields.length - 1 !== valueFieldsCount) ||
|
||||
!alignedData.fields[seriesIdx]
|
||||
) {
|
||||
if (alignedData.fields.length - 1 !== valueFieldsCount || !alignedData.fields[seriesIdx]) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -68,10 +68,7 @@ export const StateTimelineTooltip2 = ({
|
||||
* Render nothing in this case to prevent error.
|
||||
* See https://github.com/grafana/support-escalations/issues/932
|
||||
*/
|
||||
if (
|
||||
(!alignedData.meta?.transformations?.length && alignedData.fields.length - 1 !== valueFieldsCount) ||
|
||||
!alignedData.fields[seriesIdx]
|
||||
) {
|
||||
if (alignedData.fields.length - 1 !== valueFieldsCount || !alignedData.fields[seriesIdx]) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -108,10 +108,7 @@ export const StatusHistoryPanel = ({
|
||||
* Render nothing in this case to prevent error.
|
||||
* See https://github.com/grafana/support-escalations/issues/932
|
||||
*/
|
||||
if (
|
||||
(!alignedData.meta?.transformations?.length && alignedData.fields.length - 1 !== valueFieldsCount) ||
|
||||
!alignedData.fields[seriesIdx]
|
||||
) {
|
||||
if (alignedData.fields.length - 1 !== valueFieldsCount || !alignedData.fields[seriesIdx]) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user