Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add transformations to annotations dataframes #651

Merged

Conversation

javiruiz01
Copy link
Contributor

@javiruiz01 javiruiz01 commented Mar 20, 2024

  • Add transformations to annotations dataframes
  • Keep compatibility with previous transformations defined as CustomTransformOperator, we just send them normal dataframes

Valid transformations array could now look like:

transformations: [
  {
    operator: () => (source: Observable<DataFrame[]>) => source.pipe(map((frames) => frames)),
    topic: DataTopic.Annotations,
  },
  {
    id: DataTransformerID.organize,
    options: {
      excludeByName: {},
      indexByName: {},
      renameByName: {},
      includeByName: {},
    },
    topic: DataTopic.Annotations,
  },
  sortFramesTransformation,
  addTWCFieldSeriesIndexTransformation,
  addDefaultSeriesNameTransformation,
],

Fixes #451

📦 Published PR as canary version: 3.14.0--canary.651.8356712670.0

✨ Test out this PR locally via:

npm install @grafana/scenes@3.14.0--canary.651.8356712670.0
# or 
yarn add @grafana/scenes@3.14.0--canary.651.8356712670.0

@dprokop dprokop added minor Increment the minor version when merged release Create a release when this pr is merged labels Mar 20, 2024
Copy link
Member

@dprokop dprokop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this and it looks good, thank you for the contribution @javiruiz01!

@javiruiz01 javiruiz01 merged commit 336f3c9 into main Mar 20, 2024
3 checks passed
@javiruiz01 javiruiz01 deleted the feat/451_add_ability_to_transfrom_annotations_dataframes branch March 20, 2024 11:04
@grafanabot
Copy link
Contributor

🚀 PR was released in v3.14.0 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Increment the minor version when merged release Create a release when this pr is merged released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to transform annotation data frames
3 participants