[skip-ci] Add example for migrating pre-handlers#56080
Merged
joshdover merged 2 commits intoelastic:masterfrom Jan 30, 2020
Merged
[skip-ci] Add example for migrating pre-handlers#56080joshdover merged 2 commits intoelastic:masterfrom
joshdover merged 2 commits intoelastic:masterfrom
Conversation
Contributor
|
Pinging @elastic/kibana-platform (Team:Platform) |
Contributor
💚 Build Succeeded
To update your PR or re-run it, just comment with: |
mshustov
reviewed
Jan 28, 2020
src/core/MIGRATION_EXAMPLES.md
Outdated
Contributor
There was a problem hiding this comment.
That would be a pain for the plugins to declare it manually. Should we provide a type for the wrapper?
// platform code
type RequestHandlerWrapper = <P, Q, B>(
handler: RequestHandler<P, Q, B, RouteMethod>
) => RequestHandler<P, Q, B, RouteMethod>;
// plugin code
const checkLicense: RequestHandlerWrapper = handler => ....
Contributor
Author
There was a problem hiding this comment.
This type is essentially the same as:
type FunctionWrapper = <T>(x: T) => T;Maybe we could just put this in kbn/utility-types?
Contributor
Author
There was a problem hiding this comment.
Going to merge this now, but we can still decide on this and make an update to the doc.
Contributor
There was a problem hiding this comment.
the problem with this that it doesn't constrain T type. Also I don't see how you can use it to declare a function with generic types
13e8fde to
ee9110a
Compare
joshdover
added a commit
to joshdover/kibana
that referenced
this pull request
Jan 30, 2020
joshdover
added a commit
that referenced
this pull request
Jan 30, 2020
gmmorris
added a commit
to gmmorris/kibana
that referenced
this pull request
Jan 31, 2020
* master: (53 commits) Fix setting filters without $store value (elastic#56304) kuery_autocomplete -> convert remaining items to TS/Jest (elastic#56316) [Reporting] New Platform: moves most of our libs/constants and utils to np shims (elastic#55935) [reporting] remove a legacy cross-plugin import (elastic#56354) [DOCS] Updates example in Timelion doc (elastic#56444) [APM] Service map center button (elastic#56434) [skip-ci] Add example for migrating pre-handlers (elastic#56080) [ML] Fix Data Visualizer responsive layout (elastic#56372) Add missing docker settings (elastic#56411) [Endpoint] Add Endpoint Details route (elastic#55746) chore(NA): delete data/optimize with kbn clean (elastic#55890) System index templates can't be edited (elastic#55229) Sync badge (elastic#55113) Only fire appState changes when there is a change (elastic#56183) Import appropriate files to setup plugin system at the correct time (elastic#55956) [Monitoring] Change all configs to `monitoring.*` (elastic#56215) [ML] conditional rison encoding for query params (elastic#56380) Move tsvb server to new platform (elastic#55310) exclude tutorial resources from code ownership (elastic#55987) [Watcher] Follow up on flaky functional test (elastic#56384) ...
jloleysens
added a commit
to jloleysens/kibana
that referenced
this pull request
Jan 31, 2020
…56356 * '7.x' of github.com:elastic/kibana: (23 commits) Fix setting filters without $store value (elastic#56304) (elastic#56475) [ML] Fix Data Visualizer responsive layout (elastic#56372) (elastic#56472) [ML] conditional rison encoding for query params (elastic#56380) (elastic#56469) kuery_autocomplete -> convert remaining items to TS/Jest (elastic#56316) (elastic#56471) [APM] Fit service map to container (elastic#56336) (elastic#56463) Add animation to service map layout (elastic#56042) (elastic#56460) chore(NA): delete data/optimize with kbn clean (elastic#55890) (elastic#56422) [APM] Storybook support (elastic#54970) (elastic#56445) [DOCS] Updates example in Timelion doc (elastic#56444) (elastic#56454) [Logs UI] Fix Check for New Data button on empty indices screen (elastic#56239) (elastic#56320) [DOCS] Adds breaking changes for 7.6 (elastic#56437) [Monitoring] Change all configs to `monitoring.*` (elastic#56215) (elastic#56421) [skip-ci] Add example for migrating pre-handlers (elastic#56080) (elastic#56436) [7.x] System index templates can't be edited (elastic#55229) (elastic#56417) Add missing docker settings (elastic#56411) [Uptime] Use dynamic index pattern in Uptime (elastic#55446) (elastic#56386) fix edit rule for detections (elastic#56333) (elastic#56405) [Filter Bar] Remove flickering when opening filter bar popover (elastic#56222) (elastic#56385) [ILM] Index Lifecycle Policies show wrong unit in Kibana UI (elastic#55228) (elastic#55757) Move tsvb server to new platform (elastic#55310) (elastic#56394) ...
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.
Summary
Related to #48245
This adds an example of how to migrate the
preoption from Hapi routes to New Platform HTTP routes.