-
Notifications
You must be signed in to change notification settings - Fork 12.2k
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
Transformations: Extended support for variables in filter by name #75734
Transformations: Extended support for variables in filter by name #75734
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this addition! I made some small restructuring edits and a number of wording/style edits.
docs/sources/panels-visualizations/query-transform-data/transform-data/index.md
Outdated
Show resolved
Hide resolved
docs/sources/panels-visualizations/query-transform-data/transform-data/index.md
Outdated
Show resolved
Hide resolved
docs/sources/panels-visualizations/query-transform-data/transform-data/index.md
Outdated
Show resolved
Hide resolved
docs/sources/panels-visualizations/query-transform-data/transform-data/index.md
Outdated
Show resolved
Hide resolved
docs/sources/panels-visualizations/query-transform-data/transform-data/index.md
Outdated
Show resolved
Hide resolved
docs/sources/panels-visualizations/query-transform-data/transform-data/index.md
Outdated
Show resolved
Hide resolved
docs/sources/panels-visualizations/query-transform-data/transform-data/index.md
Outdated
Show resolved
Hide resolved
docs/sources/panels-visualizations/query-transform-data/transform-data/index.md
Outdated
Show resolved
Hide resolved
…orm-data/index.md Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
packages/grafana-data/src/transformations/transformers/filterByName.ts
Outdated
Show resolved
Hide resolved
const n = stringOfNames.slice(1).slice(0, -1).split(','); | ||
return { id: FieldMatcherID.byNames, options: { names: n } }; | ||
} | ||
return { id: FieldMatcherID.byNames, options: { names: stringOfNames.split(',') } }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need the split(',')
at the end here? Seems that this path will only result in single option values from my understanding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This path is if you have a variable where the value is a comma separated list of names. Maybe not the most useful scenario as it can only really happen if the user inputs it manually 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand, thanks! Not sure if we'd need some more explanatory docs around this, as it seems to me a bit like a hidden feature, but I'll leave that decision to you.
public/app/features/transformers/editors/FilterByNameTransformerEditor.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works nicely! Left a few comments, but otherwise this LGTM!
* main: Docs: Fix link to developing plugins (#75816) Fix: visualization vs visualisation in feature description (#75895) Chore: Bump storybook 7.4.5 (#75652) Correlations: Add an editor in Explore (#73315) i18n: dashboard settings (#75854) Tempo: Highlight errors in TraceQL query (#74697) Datasources: Filter plugin errors to only show datasource plugins (#74339) Fix sticky header issue (#75710) Transformations: Extended support for variables in filter by name (#75734) Alerting: Fix being redirected to list view when clicking Save rule button (#75510) Tracing: Standardize on otel tracing (#75528) Fix developer links and newly discovered spelling errors (#75875) i18n: Mark up GeneralSettings for translations (#75827) DockedMegaMenu: Refactor and rename to simplify (#75872) sql: numeric inputs: use it's own simple implementation (#74904)
This should also alleviate some issues reported by users in #25469 |
What is this feature?
This adds support for using variables with multiple values in the filter by name transformation.
Fixes #74488
The original feature request specified this behavior on organize fields. But the functionality fits a lot better in filter by name.
Special notes for your reviewer:
Please check that: