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

Index pattern/loading 2 #1617

Merged
merged 11 commits into from
Oct 9, 2014
Merged

Conversation

w33ble
Copy link
Contributor

@w33ble w33ble commented Oct 9, 2014

Replaces #1601
Fixes #1561
Fixes a bug introduced by aca2457.

The code in aca2457 assumes that SearchSources would have an indexPattern defined on them. This is the case with savedSearches but not for visualizations. Rather than use the indexPattern saving build into the SavedObject, they manage a separate indexPattern property, and link it to the SearchSource in the SavedObject#afterEsResp() callback.

This fixes the bug with the following updates:

  • SavedVis no longer manages it's own indexPattern, it is managed by the underlying SavedObject
  • searchSource.get('index') will always work synchronously
    • Previously, if a searchSource inherited it's index pattern from the global searchSource, it would return undefined.
  • rootSearchSource does not update it's index pattern when the config is changed
    • it now happens in routeSetup, which is what allowed us to make the calls to DataSource#getParent() and DataSource#get() behave synchronously.

@w33ble w33ble mentioned this pull request Oct 9, 2014
w33ble added a commit that referenced this pull request Oct 9, 2014
Index pattern/loading - after team review
@w33ble w33ble merged commit 900a26d into elastic:master Oct 9, 2014
@TiNico22 TiNico22 mentioned this pull request Oct 16, 2014
@w33ble w33ble deleted the indexPattern/loading-2 branch February 6, 2015 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fatal Error Cannot read property 'byName' of undefined
1 participant