Change importer to use saved object class, fix broken select all#4509
Merged
jbudz merged 3 commits intoelastic:masterfrom Jul 29, 2015
Merged
Change importer to use saved object class, fix broken select all#4509jbudz merged 3 commits intoelastic:masterfrom
jbudz merged 3 commits intoelastic:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
You can use Promise.map, which uses Promise.all internally
Contributor
|
There's an issue with the importing, which may not be related to this PR.
|
Contributor
|
This looks good to me, passing on for last looks. @lukasolson do chime in on that import cancel issue though. |
…oaded multiple times
Contributor
Author
|
This was due to the fact that we use an |
jbudz
added a commit
that referenced
this pull request
Jul 29, 2015
Change importer to use saved object class, fix broken select all
This was referenced Nov 16, 2015
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #3912, #4311, and #4508,
Prior to this, the import functionality would work by reading in the uploaded file then creating a simple bulk request to the .kibana index.
While this seems good and all, it caused issues, such as this: #3882.
What happens behind the scenes, is that when importing, if we don't use the saved object classes, then certain values (such as
hitsandversion) can get mapped to an incorrect type (long instead of int, etc.).This PR addresses this by utilizing the saved object classes when importing. Basically, how I accomplished this was by taking the
applyESRespfunction out and separating it, so that it could be used from outside the loading of an object. When an import happens, we use that function to load the objects as if we were loading them directly from an ES fetch, so all of the magic that usually gets applied can get applied in this step.Also part of this PR is fixing the select all functionality, which was broken because
$scope.currentTabwasn't being set initially if it was explicit in the URL.