-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Vega] Filter bar in Vega is not usable with non default index pattern. #84090
Conversation
Pinging @elastic/kibana-app (Team:KibanaApp) |
@elasticmachine merge upstream |
src/plugins/vis_type_vega/public/lib/extract_index_pattern.test.ts
Outdated
Show resolved
Hide resolved
const asyncSetIndexPattern = async () => { | ||
let index: IndexPattern | null = null; | ||
|
||
if (vis.type.getUsedIndexPattern) { |
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.
@ppisljar maybe we should rethink that comment #82964 (comment) and move getUsedIndexPattern
into vis.ts
? Now we know that we need that code at least from 2 different places.
It also seems to me not entirely correct to use such hooks and set the default index pattern in this place.I think that instead of undefined
vis.ts should return the default index for vis.data.indexPattern
@mattkime can you please take a look at this one ? |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
* @returns {Promise<SavedObject|undefined>} | ||
*/ | ||
findByTitle = async (title: string, refresh: boolean = false) => { | ||
if (!this.savedObjectsCache || refresh) { |
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 think this could rely on getIdsWithTitle
, filter based on the result, and then get
Lets call this getByTitle
# Conflicts: # docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternsservice.md # src/plugins/data/public/public.api.md
💚 Build SucceededMetrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
…n. (elastic#84090) * [Vega] Filtering is not working Closes: elastic#81738 * fix CI * some work * some work * add tests for extract_index_pattern * simplify extract_index_pattern * fix type error * cleanup * Update vega_base_view.js * Update extract_index_pattern.test.ts * fix PR comments * fix some comments * findByTitle -> getByTitle * remove getByTitle * fix vega_base_view * fix jest * allow to set multiple indexes from top_nav Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
…n. (#84090) (#84607) * [Vega] Filtering is not working Closes: #81738 * fix CI * some work * some work * add tests for extract_index_pattern * simplify extract_index_pattern * fix type error * cleanup * Update vega_base_view.js * Update extract_index_pattern.test.ts * fix PR comments * fix some comments * findByTitle -> getByTitle * remove getByTitle * fix vega_base_view * fix jest * allow to set multiple indexes from top_nav Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
…n. (elastic#84090) * [Vega] Filtering is not working Closes: elastic#81738 * fix CI * some work * some work * add tests for extract_index_pattern * simplify extract_index_pattern * fix type error * cleanup * Update vega_base_view.js * Update extract_index_pattern.test.ts * fix PR comments * fix some comments * findByTitle -> getByTitle * remove getByTitle * fix vega_base_view * fix jest * allow to set multiple indexes from top_nav Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # src/plugins/vis_type_vega/public/vega_type.ts # src/plugins/vis_type_vega/public/vega_visualization.test.js # src/plugins/vis_type_vega/public/vega_visualization.ts
…n. (#84090) (#86476) * [Vega] Filtering is not working Closes: #81738 * fix CI * some work * some work * add tests for extract_index_pattern * simplify extract_index_pattern * fix type error * cleanup * Update vega_base_view.js * Update extract_index_pattern.test.ts * fix PR comments * fix some comments * findByTitle -> getByTitle * remove getByTitle * fix vega_base_view * fix jest * allow to set multiple indexes from top_nav Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # src/plugins/vis_type_vega/public/vega_type.ts # src/plugins/vis_type_vega/public/vega_visualization.test.js # src/plugins/vis_type_vega/public/vega_visualization.ts Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Closes: #81738, Closes: #62122, Closes: #56833, Closes: #19408
Summary
Describe the bug: Filter bar in Vega is not usable with non default index pattern.
Steps to reproduce:
Expected behavior:
The fields should be filled with values from the index pattern used in Vega visualization.
Checklist
Delete any items that are not applicable to this PR.
For maintainers