-
Notifications
You must be signed in to change notification settings - Fork 12.8k
DataSourceAPI: Rename getApplicableFilters
to getFiltersApplicability
#107775
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grafana-dataRemovalsDataSourceApi.getApplicableFilters/home/runner/work/grafana/grafana/base/grafana-data/dist/types/types/datasource.d.ts getApplicableFilters?(options?: DataSourceGetTagKeysOptions): Promise; ChangesDataSourceApi.importQueries/home/runner/work/grafana/grafana/pr/grafana-data/dist/types/types/datasource.d.ts Parameter type changed:
metricFindQuery?(query: any, options?: LegacyMetricFindQueryOptions): Promise;
/**
* Verify adhoc filters applicability based on queries and current filters
*/
- getApplicableFilters?(options?: DataSourceGetTagKeysOptions): Promise;
+ getFiltersApplicability?(options?: DataSourceGetTagKeysOptions): Promise;
/**
* Get tag keys for adhoc filters
*/
getTagKeys?(options?: DataSourceGetTagKeysOptions): Promise | Promise;
|
dprokop
reviewed
Jul 8, 2025
Comment on lines
646
to
650
export interface FiltersApplicability { | ||
key: string; | ||
applicable: boolean; | ||
reason?: string; | ||
} |
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.
let's add doc comments for these, especially reason
3 tasks
dprokop
approved these changes
Jul 21, 2025
macabu
pushed a commit
that referenced
this pull request
Jul 22, 2025
…ity` (#107775) * refactor getApplicableFilters to getFiltersApplicability * add origin property as well * add comments
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/frontend
levitate breaking change
A label indicating a breaking change and assigned by Levitate.
no-changelog
Skip including change in changelog/release notes
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is this feature?
Changes a bit the newly exposed method that allows a datasource to verify which adhoc filters are applicable in a dashboard or not. The name has changed and also the response: an array of objects that contain the filter key, applicable or not flag and a reason message for non-applicability are now returned.
Why do we need this feature?
Allows us to work better with the non applicable filters and also show a tooltip on why it is invalid
Who is this feature for?
Everyone
Which issue(s) does this PR fix?:
Fixes #
Special notes for your reviewer:
Please check that: