-
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
[Rollups] Server NP migration #55606
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
7be7447
init commit: convert server code to TS + create shim
alisonelizabeth 8524ce5
added back support for rollup usage collector
alisonelizabeth ed8e4e9
added back support for index_patterns route
alisonelizabeth 323927a
add back support for index management data enricher
alisonelizabeth 186c901
rework integration with index_patterns
alisonelizabeth 41e3fdb
Merge branch 'master' into np/rollups
alisonelizabeth 57a3a8f
add back support for search_strategy
alisonelizabeth b2432e1
fix TS
alisonelizabeth 760d75c
Merge branch 'master' of github.com:elastic/kibana into np/rollups
alisonelizabeth 7cb95c3
update tests + index pattern route validation
alisonelizabeth d0ba3bf
fix i18n
alisonelizabeth 906ab1d
Merge branch 'master' of github.com:elastic/kibana into np/rollups
alisonelizabeth 2c99beb
fix logger
alisonelizabeth 6d1a0db
Merge branch 'master' of github.com:elastic/kibana into np/rollups
alisonelizabeth 9dfe043
fix license_pre_routing_factory tests
alisonelizabeth 95a5562
Merge branch 'master' into np/rollups
elasticmachine b90d0a9
address review feedback
alisonelizabeth 792946f
Merge branch 'master' into np/rollups
elasticmachine 941ccd7
address feedback
alisonelizabeth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"id": "rollup", | ||
"version": "kibana", | ||
"requiredPlugins": [ | ||
"home", | ||
"index_management", | ||
"metrics" | ||
], | ||
"optionalPlugins": [ | ||
"usageCollection" | ||
], | ||
"server": true, | ||
"ui": false | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
21 changes: 0 additions & 21 deletions
21
...k/legacy/plugins/rollup/server/lib/call_with_request_factory/call_with_request_factory.js
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
...k/legacy/plugins/rollup/server/lib/call_with_request_factory/call_with_request_factory.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { ElasticsearchServiceSetup } from 'kibana/server'; | ||
import { once } from 'lodash'; | ||
import { elasticsearchJsPlugin } from '../../client/elasticsearch_rollup'; | ||
|
||
const callWithRequest = once((elasticsearchService: ElasticsearchServiceSetup) => { | ||
const config = { plugins: [elasticsearchJsPlugin] }; | ||
return elasticsearchService.createClient('rollup', config); | ||
}); | ||
|
||
export const callWithRequestFactory = ( | ||
elasticsearchService: ElasticsearchServiceSetup, | ||
request: any | ||
) => { | ||
return (...args: any[]) => { | ||
return ( | ||
callWithRequest(elasticsearchService) | ||
.asScoped(request) | ||
// @ts-ignore | ||
.callAsCurrentUser(...args) | ||
); | ||
}; | ||
}; |
File renamed without changes.
Oops, something went wrong.
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.
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.
Do we need this factory? In my PR, I've used it directly from the router context
https://github.com/elastic/kibana/pull/56829/files#diff-178c0726cd4b1e7299f257e5069b4a42R28
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.
Thanks for sharing! I'm going to leave as is for now, but will consider changing this in my next PR.