-
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
[Maps] fix Kibana does not recognize a valid geo_shape index when attempting to create a Tracking Containment alert #96633
Conversation
…empting to create a Tracking Containment alert
Pinging @elastic/kibana-gis (Team:Geo) |
@elasticmachine merge upstream |
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.
index pattern changes look good to me
…ervice to add saved object to cache when index pattern is created
@@ -535,6 +535,7 @@ export class IndexPatternsService { | |||
}); | |||
indexPattern.id = response.id; | |||
this.indexPatternCache.set(indexPattern.id, Promise.resolve(indexPattern)); | |||
this.savedObjectsCache.push(response); |
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.
@mattkime Mind taking a look at this change. I was running into a problem where uploading a file in maps, https://www.elastic.co/guide/en/kibana/7.x/import-geospatial-data.html, resulted in getIdsAndTitles not containing the new index pattern. Instead of forcing IndexPatternSelect to call getIdsAndTitles with a force refresh, lets just update the cache when an index pattern is added
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.
thx. I tested in alerting and maps and works as expected.
Thanks for creating #96644 as follow-up. That's a really interesting approach; fixing the problem by punting on the issue altogether.
src/plugins/data/public/ui/index_pattern_select/index_pattern_select.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.
💚 Build SucceededMetrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
…empting to create a Tracking Containment alert (elastic#96633) * [Maps] fix Kibana does not recognize a valid geo_shape index when attempting to create a Tracking Containment alert * tslint * instead of forcing refresh on getIdsAndTitles, update index pattern service to add saved object to cache when index pattern is created * simplify title check * revert unneeded changes * tslint * api doc updates * fix functional test Co-authored-by: Kibana Machine <[email protected]>
…empting to create a Tracking Containment alert (elastic#96633) * [Maps] fix Kibana does not recognize a valid geo_shape index when attempting to create a Tracking Containment alert * tslint * instead of forcing refresh on getIdsAndTitles, update index pattern service to add saved object to cache when index pattern is created * simplify title check * revert unneeded changes * tslint * api doc updates * fix functional test Co-authored-by: Kibana Machine <[email protected]> # Conflicts: # docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchbar.md
…empting to create a Tracking Containment alert (#96633) (#96682) * [Maps] fix Kibana does not recognize a valid geo_shape index when attempting to create a Tracking Containment alert * tslint * instead of forcing refresh on getIdsAndTitles, update index pattern service to add saved object to cache when index pattern is created * simplify title check * revert unneeded changes * tslint * api doc updates * fix functional test Co-authored-by: Kibana Machine <[email protected]> # Conflicts: # docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchbar.md
…empting to create a Tracking Containment alert (#96633) (#96681) * [Maps] fix Kibana does not recognize a valid geo_shape index when attempting to create a Tracking Containment alert * tslint * instead of forcing refresh on getIdsAndTitles, update index pattern service to add saved object to cache when index pattern is created * simplify title check * revert unneeded changes * tslint * api doc updates * fix functional test Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
…to-metrics-tab * 'master' of github.com:elastic/kibana: (44 commits) [Exploratory View]Additional metrics for kpi over time (elastic#96532) [Fleet] UI changes on hosted policy detail view (elastic#96337) Stacked line charts incorrectly shows one term as 100% (elastic#96203) [Fleet] Create enrollment API keys as current user (elastic#96464) [Lens] Make table and metric show on top Chart switcher (elastic#96601) skip flaky suite (elastic#96691) [Lens] Hide "Show more errors" once expanded (elastic#96605) [Discover] Unskip histogram hiding test (elastic#95759) skip flyout test, add linked issue elastic#96708 skip copy_to_space_flyout_internal.test.tsx elastic#96708 fix config validation (elastic#96502) Document telemetry fields for stack security features (elastic#96638) [Partial Results] Move inspector adapter integration into search source (elastic#96241) [RAC] Rule registry plugin (elastic#95903) [APM] Run precommit tasks sequentially (elastic#96551) [Maps] fix Kibana does not recognize a valid geo_shape index when attempting to create a Tracking Containment alert (elastic#96633) [Security Solution] [Cases] Small UI bugfixes (elastic#96511) [Actions UI] Changed PagerDuty action form UI to fill payload fields according to the API docs for Resolve and Acknowledge events. (elastic#96363) App Search: Result Component Updates (elastic#96184) [Alerting] Preconfigured alert history index connector (elastic#94909) ...
Fixes #95418
This PR switches the implementation of IndexPatternSelect from using indexPatternService.find to instead using a combination of indexPatternService.getIdsWithTitle and indexPatternService.get. This was suggested by @mattkime to avoid using indexPatternService.find with a really large page size.