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

[server/indexPatterns] expose indexPatternService getter/factory #13012

Merged
merged 2 commits into from
Jul 31, 2017

Conversation

spalger
Copy link
Contributor

@spalger spalger commented Jul 20, 2017

While taking a look at https://github.com/elastic/kibana/pull/12611/files#diff-f06ef85a0e4f12fa7cc2f2ff36fe6b19 it became obvious that we needed to properly expose the IndexPatternsService, so I added:

  • request.getIndexPatternsService() - get an IndexPatternsService() that is configured to make requests to elasticsearch on behalf of this request
  • server.indexPatternsServiceFactory({ callCluster }) create an instance of the IndexPattermsService() by supplying a custom callCluster function (for use outside of request context).

@spalger spalger added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc review v6.0.0 labels Jul 20, 2017
@tylersmalley
Copy link
Contributor

jenkins, test it

Copy link
Contributor

@kimjoar kimjoar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't seem like indexPatternsServiceFactory is needed, so unless it's actually used somewhere else I'd prefer it inlined. Otherwise lgtm

@spalger spalger merged commit 9389f0b into elastic:master Jul 31, 2017
spalger added a commit that referenced this pull request Jul 31, 2017
spalger added a commit that referenced this pull request Jul 31, 2017
@spalger
Copy link
Contributor Author

spalger commented Jul 31, 2017

6.0: 947757a
6.x: e396a78

@spalger spalger deleted the implement/index-pattern-factory branch July 31, 2017 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v6.0.0-rc1 v6.0.0 v6.1.0 v7.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants